FastLED 3.10.10
Loading...
Searching...
No Matches

◆ write() [10/11]

fl::size fl::basic_string::write ( const u64 & val)

Definition at line 336 of file basic_string.cpp.hpp.

336 {
337 char buf[64] = {0};
338#if FL_PLATFORM_HAS_LARGE_MEMORY
339 int len = fl::utoa64(val, buf, 10);
340#else
341 // Low-memory gate per #3224 Tier 3G: route through the 32-bit utoa to
342 // avoid `__udivmoddi4` + `__clzdi2` (libgcc-nofp's 64-bit divmod cascade,
343 // ~1.5 KB on Cortex-M0+). Values larger than UINT32_MAX saturate.
344 int len = fl::utoa32(val > 0xFFFFFFFFull ? 0xFFFFFFFFu
345 : static_cast<fl::u32>(val),
346 buf, 10);
347#endif
348 return write(buf, len);
349}
fl::size write(const fl::u8 *data, fl::size n) FL_NO_EXCEPT
int utoa32(u32 value, char *sp, int radix) FL_NO_EXCEPT
Convert unsigned 32-bit integer to string buffer in given radix.
int utoa64(u64 value, char *sp, int radix) FL_NO_EXCEPT
Convert unsigned 64-bit integer to string buffer in given radix.

References fl::FL_NO_EXCEPT, fl::utoa32(), fl::utoa64(), and write().

+ Here is the call graph for this function: