|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <AXP202Coulomb.hpp>
Public Member Functions | |
| AXP202Coulomb (AXP202Core &core) | |
| bool | enable (bool enable) |
| Enable coulomb counter (REG B8H bit 7) | |
| bool | isEnabled () |
| bool | pause () |
| Pause coulomb counter (REG B8H bit 6) | |
| bool | resume () |
| Resume coulomb counter (REG B8H bit 6 clear) | |
| bool | clear () |
| Clear/reset coulomb counter (REG B8H bit 5) | |
| uint32_t | getChargeCoulomb () |
| Read charge coulomb counter (REG B0H-B3H, 32-bit big-endian) | |
| uint32_t | getDischargeCoulomb () |
| Read discharge coulomb counter (REG B4H-B7H, 32-bit big-endian) | |
Definition at line 17 of file AXP202Coulomb.hpp.
|
inlineexplicit |
Definition at line 20 of file AXP202Coulomb.hpp.
|
inline |
Clear/reset coulomb counter (REG B8H bit 5)
Definition at line 60 of file AXP202Coulomb.hpp.
References axp202_regs::coulomb::COULOMB_CTL, and SensorCommWrapper::setRegBit().
|
inline |
Enable coulomb counter (REG B8H bit 7)
| enable | true to enable counting |
Definition at line 27 of file AXP202Coulomb.hpp.
References SensorCommWrapper::clrRegBit(), axp202_regs::coulomb::COULOMB_CTL, enable(), and SensorCommWrapper::setRegBit().
Referenced by enable().
|
inline |
Read charge coulomb counter (REG B0H-B3H, 32-bit big-endian)
Definition at line 69 of file AXP202Coulomb.hpp.
References axp202_regs::coulomb::BAT_CHGCOULOMB3.
|
inline |
Read discharge coulomb counter (REG B4H-B7H, 32-bit big-endian)
Definition at line 78 of file AXP202Coulomb.hpp.
References axp202_regs::coulomb::BAT_DISCHGCOULOMB3.
|
inline |
Definition at line 33 of file AXP202Coulomb.hpp.
References axp202_regs::coulomb::COULOMB_CTL, and SensorCommWrapper::getRegBit().
|
inline |
Pause coulomb counter (REG B8H bit 6)
Definition at line 42 of file AXP202Coulomb.hpp.
References axp202_regs::coulomb::COULOMB_CTL, and SensorCommWrapper::setRegBit().
|
inline |
Resume coulomb counter (REG B8H bit 6 clear)
Definition at line 51 of file AXP202Coulomb.hpp.
References SensorCommWrapper::clrRegBit(), and axp202_regs::coulomb::COULOMB_CTL.