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

◆ size_as_rgb()

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

Definition at line 236 of file rgbw.h.

236 {
237 // The ObjectFLED controller expects the raw pixel byte data in
238 // multiples of 3. In the case of src data not a multiple of 3, then we
239 // need to add pad bytes so that the delegate controller doesn't walk
240 // off the end of the array and invoke a buffer overflow panic.
241 num_of_rgbw_pixels = (num_of_rgbw_pixels * 4 + 2) / 3;
242 u32 extra = num_of_rgbw_pixels % 3 ? 1 : 0;
243 num_of_rgbw_pixels += extra;
244 return num_of_rgbw_pixels;
245 }

References fl::FL_NO_EXCEPT.

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

+ Here is the caller graph for this function: