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(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 95 of file p9813.h.

95 {
96 // P9813 protocol:
97 // - Start boundary: 4 bytes (0x00000000)
98 // - LED data: 4 bytes per LED (flag byte + BGR)
99 // - End boundary: 4 bytes (0x00000000)
100 return 4 + (num_leds * 4) + 4;
101 }
P9813 controller class.
Definition p9813.h:26

References FL_NO_EXCEPT.