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

◆ calculateBytes()

template<int DATA_PIN, fl::u8 CLOCK_PIN, EOrder RGB_ORDER = RGB, fl::u32 SPI_SPEED = DATA_RATE_MHZ(1)>
static constexpr size_t WS2801Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::calculateBytes ( size_t num_leds)
inlinestaticconstexpr

Calculate total byte count for WS2801 protocol Used for quad-SPI buffer pre-allocation.

Parameters
num_ledsNumber of LEDs in the strip
Returns
Total bytes needed (RGB data only, no overhead)

Definition at line 76 of file ws2801.h.

76 {
77 // WS2801 protocol:
78 // - LED data: 3 bytes per LED (RGB)
79 // - No frame overhead (latch is timing-based, not data-based)
80 return num_leds * 3;
81 }
WS2801 controller class.
Definition ws2801.h:25