14static constexpr uint8_t REG_VCELL = 0x02;
15static constexpr uint8_t REG_SOC = 0x04;
16static constexpr uint8_t REG_MODE = 0x06;
17static constexpr uint8_t REG_VERSION = 0x08;
21static constexpr uint16_t CONFIG_POWER_UP_DEFAULT = 0x971C;
23static constexpr uint16_t CONFIG_SAFE_MASK = 0xFF1F;
24static constexpr uint16_t CONFIG_SLEEP = 0x0080;
25static constexpr uint16_t CONFIG_ALRT = 0x0020;
28static constexpr uint16_t MODE_EN_SLEEP = 0x2000;
29static constexpr uint16_t STATUS_HD = 0x1000;
31static constexpr uint32_t WAKE_ALERT_CLEAR_TIMEOUT_ID = 0;
33static constexpr uint32_t WAKE_ALERT_CLEAR_DELAY_MS = 2000;
43 void setup()
override;
58extern template class MAX170xxComponent<Model::MODEL_MAX17043>;
59extern template class MAX170xxComponent<Model::MODEL_MAX17048>;
This class simplifies creating components that periodically check a state.
This Class provides the methods to read/write bytes from/to an i2c device.
Defined in max170xx.cpp, which instantiates both models.
void clear_wake_alert_()
Clear the false alert raised on waking, leaving every other CONFIG and STATUS bit as it is.
bool configure_()
Verify and wake the gauge; false if it did not answer.
bool ready_for_update_()
True once the gauge is configured; otherwise retries the configuration and warns if the gauge did not...