FastLED 3.10.8
Loading...
Searching...
No Matches

◆ escapeToBootloaderIfLooping()

bool fl::Watchdog::escapeToBootloaderIfLooping ( )

Reboot into the bootloader if this looks like a boot loop.

Returns
false when not looping, or when the platform has no bootloader reboot. On success it does not return.

The crash counter is deliberately left alone: if the reboot is unsupported we must not destroy the evidence that a loop is happening.

Definition at line 117 of file watchdog.cpp.hpp.

117 {
118 if (!shouldEscapeToBootloader()) return false;
119 // Deliberately does NOT clear the crash counter: where bootloader reboot
120 // is unsupported this returns false, and zeroing the count would destroy
121 // the evidence of the very boot loop being detected.
122 return rebootIntoBootloader();
123}
bool shouldEscapeToBootloader() const FL_NO_EXCEPT
True when the escape is enabled and the board has hit the consecutive-watchdog-reset threshold.
bool rebootIntoBootloader() FL_NO_EXCEPT

References fl::FL_NO_EXCEPT, rebootIntoBootloader(), and shouldEscapeToBootloader().

Referenced by setSafeModeThreshold().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: