FastLED 3.10.6
Loading...
Searching...
No Matches

◆ writeHex()

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

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

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

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

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

+ Here is the caller graph for this function: