|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
#include <PmicWatchdogBase.hpp>
Public Member Functions | |
| virtual | ~PmicWatchdogBase ()=default |
| Virtual destructor. | |
| virtual bool | enableWatchdog (bool enable)=0 |
| Enable or disable the watchdog timer. | |
| virtual bool | isWatchdogEnabled () const =0 |
| Check if watchdog is enabled. | |
| virtual bool | setWatchdogTimeout (uint16_t timeout_s)=0 |
| Set the watchdog timeout duration. | |
| virtual uint16_t | getWatchdogTimeout () const =0 |
| Get the current watchdog timeout setting. | |
| virtual bool | resetWatchdog ()=0 |
| Reset the watchdog timer (feed the watchdog). | |
Definition at line 44 of file PmicWatchdogBase.hpp.
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Enable or disable the watchdog timer.
When disabled, the PMIC will not monitor I2C communication. When enabled, the watchdog must be regularly reset (fed) to prevent timeout.
| enable | True to enable watchdog, false to disable |
Implemented in SY6970Power, BQ25896Power, and AXP2101Watchdog.
|
pure virtual |
Get the current watchdog timeout setting.
Implemented in SY6970Power, BQ25896Power, and AXP2101Watchdog.
|
pure virtual |
Check if watchdog is enabled.
Implemented in SY6970Power, BQ25896Power, and AXP2101Watchdog.
|
pure virtual |
Reset the watchdog timer (feed the watchdog).
This must be called regularly before the watchdog timeout expires to prevent the PMIC from resetting due to I2C communication timeout.
Implemented in SY6970Power, BQ25896Power, and AXP2101Watchdog.
|
pure virtual |
Set the watchdog timeout duration.
Sets how long the watchdog will wait before triggering a fault. Must be called after enableWatchdog(true).
| timeout_s | Timeout in seconds (chip-specific valid values, typically 0=disabled, 40, 80, 160) |
Implemented in SY6970Power, BQ25896Power, and AXP2101Watchdog.