5#include "pixel_iterator.h"
8#include "platforms/spi_output_template.h"
25template <
int DATA_PIN, fl::u8 CLOCK_PIN, EOrder RGB_ORDER = RGB, fl::u32 SPI_SPEED = DATA_RATE_MHZ(10)>
27 typedef fl::SPIOutput<DATA_PIN, CLOCK_PIN, SPI_SPEED>
SPI;
34 mSPI.writeByte(top);
mSPI.writeByte(b);
mSPI.writeByte(g);
mSPI.writeByte(r);
50 while(pixels.
has(1)) {
57 mSPI.endTransaction();
70 static const fl::u8 frame[] = {
94 return 4 + (num_leds * 4) + 4;
CPixelLEDController(RegistrationMode mode)
static constexpr fl::u8 getPaddingByte()
Get the protocol-safe padding byte for P9813 Used for quad-SPI lane padding when strips have differen...
static constexpr size_t calculateBytes(size_t num_leds)
Calculate total byte count for P9813 protocol Used for quad-SPI buffer pre-allocation.
FASTLED_FORCE_INLINE void writeLed(fl::u8 r, fl::u8 g, fl::u8 b)
virtual void showPixels(PixelController< RGB_ORDER > &pixels)
Send the LED data to the strip.
static constexpr size_t getPaddingLEDFrameSize()
Get the size of the padding LED frame in bytes.
P9813Controller() FL_NOEXCEPT
virtual void init()
Initialize the LED controller.
static fl::span< const fl::u8 > getPaddingLEDFrame()
Get a black LED frame for synchronized latching Used for quad-SPI lane padding to ensure all strips l...
fl::SPIOutput< DATA_PIN, CLOCK_PIN, SPI_SPEED > SPI
Includes defintions for RGB and HSV pixels.
#define FASTLED_FORCE_INLINE
#define FL_DISABLE_WARNING_PUSH
#define FL_DISABLE_WARNING_POP
#define FL_DISABLE_WARNING_DEPRECATED_REGISTER
FASTLED_FORCE_INLINE fl::u8 loadAndScale0(int lane, fl::u8 scale)
non-template alias of loadAndScale<0>()
FASTLED_FORCE_INLINE void advanceData()
Advance the data pointer forward, adjust position counter.
FASTLED_FORCE_INLINE fl::u8 loadAndScale1(int lane, fl::u8 scale)
non-template alias of loadAndScale<1>()
FASTLED_FORCE_INLINE bool has(int n)
Do we have n pixels left to process?
FASTLED_FORCE_INLINE void stepDithering()
Step the dithering forward - creates triangular wave that toggles between pixels.
FASTLED_FORCE_INLINE fl::u8 loadAndScale2(int lane, fl::u8 scale)
non-template alias of loadAndScale<2>()