File tree 2 files changed +12
-0
lines changed
libraries/Nicla_System/src 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,17 @@ bool nicla::disableLDO()
85
85
return true ;
86
86
}
87
87
88
+ bool nicla::enterShipMode ()
89
+ {
90
+ // STATUS reg:
91
+ // | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
92
+ // | RO | RO | EN_SHIPMODE | RO | RO | RO | RO | RO |
93
+
94
+ uint8_t status_reg = _pmic.getStatus ();
95
+ status_reg |= 0x20 ;
96
+ _pmic.writeByte (BQ25120A_ADDRESS, BQ25120A_STATUS, status_reg);
97
+ }
98
+
88
99
uint8_t nicla::readLDOreg ()
89
100
{
90
101
uint8_t ldo_reg = _pmic.readByte (BQ25120A_ADDRESS, BQ25120A_LDO_CTRL);
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class nicla {
15
15
static bool enable3V3LDO ();
16
16
static bool enable1V8LDO ();
17
17
static bool disableLDO ();
18
+ static bool enterShipMode ();
18
19
19
20
static RGBled leds;
20
21
static BQ25120A _pmic;
You can’t perform that action at this time.
0 commit comments