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(10)>
static constexpr size_t P9813Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::calculateBytes ( size_t num_leds)
inlinestaticconstexpr

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

Parameters
num_ledsNumber of LEDs in the strip
Returns
Total bytes needed (boundaries + LED data)

Definition at line 89 of file p9813.h.

89 {
90 // P9813 protocol:
91 // - Start boundary: 4 bytes (0x00000000)
92 // - LED data: 4 bytes per LED (flag byte + BGR)
93 // - End boundary: 4 bytes (0x00000000)
94 return 4 + (num_leds * 4) + 4;
95 }
P9813 controller class.
Definition p9813.h:26