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

◆ size_as_rgb()

static uint32_t Rgbw::size_as_rgb ( uint32_t num_of_rgbw_pixels)
inlinestatic

Definition at line 41 of file rgbw.h.

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

Referenced by fl::DrawItem::DrawItem(), RGBWEmulatedController< CONTROLLER, RGB_ORDER >::beginShowLeds(), RGBWEmulatedController< CONTROLLER, RGB_ORDER >::ensureBuffer(), and RGBWEmulatedController< CONTROLLER, RGB_ORDER >::showPixels().

+ Here is the caller graph for this function: