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

◆ size_as_rgb()

static uint32_t fl::Rgbw::size_as_rgb ( uint32_t num_of_rgbw_pixels)
inlinestatic

Definition at line 39 of file rgbw.h.

39 {
40 // The ObjectFLED controller expects the raw pixel byte data in
41 // multiples of 3. In the case of src data not a multiple of 3, then we
42 // need to add pad bytes so that the delegate controller doesn't walk
43 // off the end of the array and invoke a buffer overflow panic.
44 num_of_rgbw_pixels = (num_of_rgbw_pixels * 4 + 2) / 3;
45 uint32_t extra = num_of_rgbw_pixels % 3 ? 1 : 0;
46 num_of_rgbw_pixels += extra;
47 return num_of_rgbw_pixels;
48 }

Referenced by fl::DrawItem::DrawItem().

+ Here is the caller graph for this function: