File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
libraries/Nicla_System/src Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,17 @@ bool nicla::disableLDO()
8585 return true ;
8686}
8787
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+
8899uint8_t nicla::readLDOreg ()
89100{
90101 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 {
1515 static bool enable3V3LDO ();
1616 static bool enable1V8LDO ();
1717 static bool disableLDO ();
18+ static bool enterShipMode ();
1819
1920 static RGBled leds;
2021 static BQ25120A _pmic;
You can’t perform that action at this time.
0 commit comments