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

◆ writeHex()

fl::size fl::platforms::writeHex ( fl::span< char > out,
fl::u32 value )
inline

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

35 {
36 char tmp[10];
37 tmp[0] = '0';
38 tmp[1] = 'x';
39 static const char hex[] = "0123456789abcdef";
40 for (int i = 7; i >= 0; --i) {
41 tmp[2 + (7 - i)] = hex[(value >> (i * 4)) & 0xFu];
42 }
43 fl::size n = (out.size() < 10) ? out.size() : 10;
44 for (fl::size i = 0; i < n; ++i) out[i] = tmp[i];
45 return n;
46}
constexpr fl::size size() const FL_NOEXCEPT
Definition span.h:458
constexpr int type_rank< T >::value
const hex_t hex
Definition ios.cpp.hpp:6

References FL_NOEXCEPT, fl::hex, and fl::type_rank< T >::value.

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

+ Here is the caller graph for this function: