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

◆ ucs7604FrameBytes()

size_t fl::ucs7604FrameBytes ( size_t num_leds,
UCS7604Mode mode,
bool is_rgbw )
inline

Total wire bytes of a complete UCS7604 frame.

Preamble + padding + pixel data, the length encodeUCS7604 writes. Callers that must size a capture or predict whether a frame fits need this without encoding it first (FastLED#4371); encodeUCS7604 computes its own padding from here so the two cannot drift.

Definition at line 253 of file ucs7604.h.

254 {
255 constexpr size_t kPreambleLen = 15;
256 const size_t total = kPreambleLen + num_leds * ucs7604BytesPerLed(mode, is_rgbw);
257 // The protocol requires the total to be divisible by 3.
258 return total + (3u - (total % 3u)) % 3u;
259}
size_t ucs7604BytesPerLed(UCS7604Mode mode, bool is_rgbw) FL_NO_EXCEPT
Wire bytes each LED contributes to a UCS7604 frame.
Definition ucs7604.h:240

References FL_NO_EXCEPT, and ucs7604BytesPerLed().

Referenced by encodeUCS7604().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: