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

◆ calculateBytes()

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

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

Parameters
num_ledsNumber of LEDs in the strip
Returns
Total bytes needed (RGB data + latch bytes)

Definition at line 92 of file lpd880x.h.

92 {
93 // LPD8806 protocol:
94 // - LED data: 3 bytes per LED (GRB with high bit set)
95 // - Latch: ((num_leds * 3 + 63) / 64) bytes of 0x00
96 return (num_leds * 3) + ((num_leds * 3 + 63) / 64);
97 }
LPD8806 controller class.
Definition lpd880x.h:29

References FL_NO_EXCEPT.