Fixes and improvements (#185)

- unPhone improvements related to power and boot (add boot count logging)
- Cleanup of Mutex acquire/release
- Removed `tt_assert()` in favour of `assert()`
- Fix sim build (likely failed due to migration of GitHub Actions to Ubuntu 24.04)
This commit is contained in:
Ken Van Hoeylandt
2025-01-24 22:49:29 +01:00
committed by GitHub
parent 3be251d8fb
commit d86dc40472
47 changed files with 223 additions and 177 deletions
+9 -11
View File
@@ -60,18 +60,16 @@ bool Bq24295::setWatchDogTimer(WatchDogTimer in) const {
// endregoin
// region Operation Control
// region Operation Control (REG07)
bool Bq24295::getOperationControl(uint8_t value) const {
return readRegister8(registers::OPERATION_CONTROL, value);
}
bool Bq24295::setOperationControlBitOn(uint8_t mask) const {
return bitOn(registers::OPERATION_CONTROL, mask);
}
bool Bq24295::setOperationControlBitOff(uint8_t mask) const {
return bitOff(registers::OPERATION_CONTROL, mask);
bool Bq24295::setBatFetOn(bool on) const {
if (on) {
// bit 5 low means bat fet is on
return bitOff(registers::OPERATION_CONTROL, BIT(5));
} else {
// bit 5 high means bat fet is off
return bitOn(registers::OPERATION_CONTROL, BIT(5));
}
}
// endregion
+1 -3
View File
@@ -26,9 +26,7 @@ public:
bool isUsbPowerConnected() const;
bool getOperationControl(uint8_t value) const;
bool setOperationControlBitOn(uint8_t mask) const;
bool setOperationControlBitOff(uint8_t mask) const;
bool setBatFetOn(bool on) const;
bool getStatus(uint8_t& value) const;
bool getVersion(uint8_t& value) const;