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(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 86 of file lpd880x.h.

86 {
87 // LPD8806 protocol:
88 // - LED data: 3 bytes per LED (GRB with high bit set)
89 // - Latch: ((num_leds * 3 + 63) / 64) bytes of 0x00
90 return (num_leds * 3) + ((num_leds * 3 + 63) / 64);
91 }
LPD8806 controller class.
Definition lpd880x.h:29