84 uint32_t readCoulomb32(uint8_t regH)
88 return (
static_cast<uint32_t
>(
buf[0]) << 24) |
89 (
static_cast<uint32_t
>(
buf[1]) << 16) |
90 (
static_cast<uint32_t
>(
buf[2]) << 8) |
91 static_cast<uint32_t
>(
buf[3]);
uint32_t getDischargeCoulomb()
Read discharge coulomb counter (REG B4H-B7H, 32-bit big-endian)
uint32_t getChargeCoulomb()
Read charge coulomb counter (REG B0H-B3H, 32-bit big-endian)
bool pause()
Pause coulomb counter (REG B8H bit 6)
bool enable(bool enable)
Enable coulomb counter (REG B8H bit 7)
AXP202Coulomb(AXP202Core &core)
bool clear()
Clear/reset coulomb counter (REG B8H bit 5)
bool resume()
Resume coulomb counter (REG B8H bit 6 clear)
bool clrRegBit(uint8_t reg, uint8_t bit)
bool getRegBit(uint8_t reg, uint8_t bit)
int readRegBuff(uint8_t reg, uint8_t *buf, size_t len) const
bool setRegBit(uint8_t reg, uint8_t bit)
static constexpr uint8_t COULOMB_CTL
static constexpr uint8_t BAT_CHGCOULOMB3
static constexpr uint8_t BAT_DISCHGCOULOMB3