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

◆ bytesPerLed()

fl::u8 fl::fled::bytesPerLed ( fl::u8 pixelFormat)

Definition at line 8 of file pixel_format.cpp.hpp.

8 {
9 switch (pixelFormat) {
10 case static_cast<fl::u8>(PixelFormat::Rgb8): return 3;
11 case static_cast<fl::u8>(PixelFormat::Gray8): return 1;
12 case static_cast<fl::u8>(PixelFormat::Rgba8): return 4;
13 case static_cast<fl::u8>(PixelFormat::Rgbw8): return 4;
14 case static_cast<fl::u8>(PixelFormat::Rgb565Le): return 2;
15 case static_cast<fl::u8>(PixelFormat::Rgb16Linear): return 6;
16 default: return 0;
17 }
18}
unsigned char u8
Definition stdint.h:131

References fl::FL_NO_EXCEPT, Gray8, Rgb16Linear, Rgb565Le, Rgb8, Rgba8, and Rgbw8.

Referenced by fl::video::PixelStream::begin(), fl::Fled::bytesPerLed(), fl::Fled::frameCount(), and fl::Fled::videoFrame().

+ Here is the caller graph for this function: