Skip to content

Commit

Permalink
Merge pull request #635 from alessandromrc/patch-2
Browse files Browse the repository at this point in the history
Added return to function enterShipMode
  • Loading branch information
sebromero authored May 17, 2023
2 parents 792c9f8 + 76a97fb commit d149870
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/Nicla_System/src/Nicla_System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ bool nicla::enterShipMode()
uint8_t status_reg = _pmic.getStatusRegister();
status_reg |= 0x20;
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_STATUS, status_reg);
if (_pmic.readByte(BQ25120A_ADDRESS, BQ25120A_STATUS) != status_reg) {
return false;
}
return true;
}

bool nicla::enableCharging(uint16_t mA)
Expand Down

0 comments on commit d149870

Please sign in to comment.