FastLED 3.9.15
Loading...
Searching...
No Matches

◆ resetCauseName()

fl::string_view fl::resetCauseName ( ResetCause c)
inline

Return a static-lifetime name for c — zero-cost, no allocation.

String literal lives in flash on embedded platforms. Safe to call from any context (ISR, panic handler, before setup() finishes). Backed by fl::string_view so the result has no destructor and can be passed by value freely.

Definition at line 61 of file watchdog.h.

61 {
62 switch (c) {
63 case ResetCause::POWER_ON: return fl::string_view("POWER_ON");
64 case ResetCause::BROWNOUT: return fl::string_view("BROWNOUT");
65 case ResetCause::EXTERNAL_PIN: return fl::string_view("EXTERNAL_PIN");
66 case ResetCause::WATCHDOG: return fl::string_view("WATCHDOG");
67 case ResetCause::SOFTWARE: return fl::string_view("SOFTWARE");
68 case ResetCause::LOCKUP: return fl::string_view("LOCKUP");
69 case ResetCause::DEBUGGER: return fl::string_view("DEBUGGER");
70 case ResetCause::PANIC: return fl::string_view("PANIC");
72 default: return fl::string_view("UNKNOWN");
73 }
74}

References BROWNOUT, DEBUGGER, EXTERNAL_PIN, FL_NOEXCEPT, LOCKUP, PANIC, POWER_ON, SOFTWARE, UNKNOWN, and WATCHDOG.

Referenced by fl::ResetInfo::causeName().

+ Here is the caller graph for this function: