FastLED 3.9.15
Loading...
Searching...
No Matches

◆ showPixels()

template<int DATA_PIN, fl::u8 CLOCK_PIN, EOrder RGB_ORDER = RGB, fl::u32 SPI_SPEED = DATA_RATE_MHZ(12)>
virtual void LPD6803Controller< DATA_PIN, CLOCK_PIN, RGB_ORDER, SPI_SPEED >::showPixels ( PixelController< RGB_ORDER > & pixels)
inlineprotectedvirtual

Send the LED data to the strip.

Parameters
pixelsthe PixelController object for the LED data

Definition at line 119 of file lpd880x.h.

119 {
120 mSPI.select();
121
123 while(pixels.has(1)) {
125 command = 0x8000;
126 command |= (pixels.loadAndScale0() & 0xF8) << 7; // red is the high 5 bits
127 command |= (pixels.loadAndScale1() & 0xF8) << 2; // green is the middle 5 bits
128 mSPI.writeByte((command >> 8) & 0xFF);
129 command |= pixels.loadAndScale2() >> 3 ; // blue is the low 5 bits
130 mSPI.writeByte(command & 0xFF);
131
132 pixels.stepDithering();
133 pixels.advanceData();
134 }
136 mSPI.endTransaction();
137 }
void startBoundary()
Definition lpd880x.h:107
void endBoundary(int nLeds)
Definition lpd880x.h:108
LPD6803 controller class (LPD1101).
Definition lpd880x.h:103
virtual int size() const FL_NOEXCEPT
How many LEDs does this controller manage?

References PixelController< RGB_ORDER, LANES, MASK >::advanceData(), endBoundary(), FASTLED_REGISTER, PixelController< RGB_ORDER, LANES, MASK >::has(), PixelController< RGB_ORDER, LANES, MASK >::loadAndScale0(), PixelController< RGB_ORDER, LANES, MASK >::loadAndScale1(), PixelController< RGB_ORDER, LANES, MASK >::loadAndScale2(), mSPI, PixelController< RGB_ORDER, LANES, MASK >::size(), startBoundary(), and PixelController< RGB_ORDER, LANES, MASK >::stepDithering().

+ Here is the call graph for this function: