|
FastLED 3.10.8
|
Unified cross-platform watchdog interface.
Singleton accessed through FastLED.watchdog() or fl::Watchdog::instance().
Definition at line 123 of file watchdog.h.
#include <watchdog.h>
Public Member Functions | |
| void | begin (fl::u32 timeout_ms) FL_NO_EXCEPT |
| fl::u32 | bootGuardCount () const FL_NO_EXCEPT |
Early-boot loop guard counter (see fl/wdt/boot_guard.h): consecutive boots since the last markBootHealthy(), kept in reset-persistent memory. | |
| fl::u16 | bootloaderEscapeThreshold () const FL_NO_EXCEPT |
| Boot-loop escape hatch: drop to the bootloader instead of looping forever, so an unattended host can re-flash the board. | |
| void | clearCrashReport () FL_NO_EXCEPT |
| fl::u16 | consecutiveCrashCount () const FL_NO_EXCEPT |
| void | disable () FL_NO_EXCEPT |
| bool | escapeToBootloaderIfLooping () FL_NO_EXCEPT |
| Reboot into the bootloader if this looks like a boot loop. | |
| void | feed () FL_NO_EXCEPT |
| bool | hasCrashReport () const FL_NO_EXCEPT |
| bool | isInSafeMode () const FL_NO_EXCEPT |
| ResetCause | lastResetCause () const FL_NO_EXCEPT |
| ResetInfo | lastResetInfo () const FL_NO_EXCEPT |
| Detailed reset information including platform raw register + subcause id. | |
| bool | lastResetWasWatchdog () const FL_NO_EXCEPT |
| void | markBootHealthy () FL_NO_EXCEPT |
| Tell the early-boot guard this boot is healthy, zeroing its counter. | |
| void | markCleanShutdown () FL_NO_EXCEPT |
| bool | onTimeout (fl::function< void()> cb) FL_NO_EXCEPT |
| bool | onTimeout (WatchdogTimeoutCallback cb, void *user_data=nullptr) FL_NO_EXCEPT |
| fl::u8 | persistRead (fl::size idx) const FL_NO_EXCEPT |
| void | persistWrite (fl::size idx, fl::u8 v) FL_NO_EXCEPT |
| fl::size | readCrashLog (fl::span< fl::u8 > out) const FL_NO_EXCEPT |
| WatchdogCrashReport | readCrashReport () const FL_NO_EXCEPT |
| FL_NO_RETURN void | reboot () FL_NO_EXCEPT |
| bool | rebootIntoBootloader () FL_NO_EXCEPT |
| fl::u16 | safeModeThreshold () const FL_NO_EXCEPT |
| void | setBootloaderEscapeThreshold (fl::u16 threshold) FL_NO_EXCEPT |
| Set the consecutive-watchdog-reset count that triggers the escape. | |
| bool | setPauseOnDebug (bool pause) FL_NO_EXCEPT |
| void | setSafeModeThreshold (fl::u16 threshold) FL_NO_EXCEPT |
| bool | setWindow (fl::u32 window_min_ms, fl::u32 window_max_ms) FL_NO_EXCEPT |
| bool | shouldEscapeToBootloader () const FL_NO_EXCEPT |
| True when the escape is enabled and the board has hit the consecutive-watchdog-reset threshold. | |
| bool | writeCrashLog (fl::span< const fl::u8 > payload) FL_NO_EXCEPT |
Static Public Member Functions | |
| static Watchdog & | instance () FL_NO_EXCEPT |
Private Member Functions | |
| Watchdog () FL_NO_EXCEPT=default | |
| Watchdog (const Watchdog &) FL_NO_EXCEPT=delete | |
| ~Watchdog () FL_NO_EXCEPT=default | |
| Watchdog & | operator= (const Watchdog &) FL_NO_EXCEPT=delete |
Private Attributes | |
| fl::u16 | mBootloaderEscapeThreshold = 0 |
| fl::u16 | mSafeModeThreshold = 2 |