Various fixes and improvements (#182)

- Fix for `logMutex` bug where the `Mutex` constructor is not called when doing early boot logging (with `DEBUG` level logging) . The only way to make it work is to explicitly call the constructor in the logging wrapper function.
- Fix for unPhone power states
This commit is contained in:
Ken Van Hoeylandt
2025-01-23 21:17:33 +01:00
committed by GitHub
parent 9fb8d45b2e
commit bb7e79886f
6 changed files with 163 additions and 61 deletions
+15 -3
View File
@@ -6,13 +6,25 @@
class Bq24295 : I2cDevice {
private:
bool readChargeTermination(uint8_t& out) const;
public:
enum class WatchDogTimer {
Disabled = 0b000000,
Enabled40s = 0b010000,
Enabled80s = 0b100000,
Enabled160s = 0b110000
};
explicit Bq24295(i2c_port_t port) : I2cDevice(port, BQ24295_ADDRESS) {}
bool getWatchDog(uint8_t value) const;
bool setWatchDogBitOn(uint8_t mask) const;
bool setWatchDogBitOff(uint8_t mask) const;
bool getWatchDogTimer(WatchDogTimer& out) const;
bool setWatchDogTimer(WatchDogTimer in) const;
bool isUsbPowerConnected() const;
bool getOperationControl(uint8_t value) const;
bool setOperationControlBitOn(uint8_t mask) const;