MCPcopy Create free account
hub / github.com/FastLED/FastLED / describe

Method describe

src/fl/wdt/watchdog.cpp.hpp:68–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66} // namespace platforms
67
68fl::size ResetInfo::describe(fl::span<char> out, bool verbose) const FL_NOEXCEPT {
69 fl::size n = 0;
70 // <cause>
71 n += platforms::writeView(out.subspan(n), causeName());
72 // ( <sub> ) if subcauseId != 0
73 if (subcauseId != 0) {
74 fl::string_view sub = subcauseName();
75 if (sub.size() != 0) {
76 n += platforms::writeView(out.subspan(n), fl::string_view(" ("));
77 n += platforms::writeView(out.subspan(n), sub);
78 n += platforms::writeChar(out.subspan(n), ')');
79 }
80 }
81 if (verbose) {
82 n += platforms::writeView(out.subspan(n), fl::string_view(" raw="));
83 n += platforms::writeHex(out.subspan(n), rawRegister);
84 }
85 return platforms::writeNulIfRoom(out, n);
86}
87
88// =============================================================================
89// Watchdog::lastResetInfo() default — platforms can override

Callers 2

scopedWatchdogFirstInitFunction · 0.80
watchdog.cppFile · 0.80

Calls 7

writeViewFunction · 0.85
writeCharFunction · 0.85
writeHexFunction · 0.85
writeNulIfRoomFunction · 0.85
string_viewClass · 0.50
subspanMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected