FastLED 3.10.8
Loading...
Searching...
No Matches

◆ size_as_rgb()

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

Definition at line 262 of file rgbw.h.

262 {
263 // The ObjectFLED controller expects the raw pixel byte data in
264 // multiples of 3. In the case of src data not a multiple of 3, then we
265 // need to add pad bytes so that the delegate controller doesn't walk
266 // off the end of the array and invoke a buffer overflow panic.
267 num_of_rgbw_pixels = (num_of_rgbw_pixels * 4 + 2) / 3;
268 u32 extra = num_of_rgbw_pixels % 3 ? 1 : 0;
269 num_of_rgbw_pixels += extra;
270 return num_of_rgbw_pixels;
271 }

References fl::FL_NO_EXCEPT.

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

+ Here is the caller graph for this function: