FastLED 3.10.8
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 131 of file lpd880x.h.

131 {
132 mSPI.select();
133
135 while(pixels.has(1)) {
137 command = 0x8000;
138 command |= (pixels.loadAndScale0() & 0xF8) << 7; // red is the high 5 bits
139 command |= (pixels.loadAndScale1() & 0xF8) << 2; // green is the middle 5 bits
140 mSPI.writeByte((command >> 8) & 0xFF);
141 command |= pixels.loadAndScale2() >> 3 ; // blue is the low 5 bits
142 mSPI.writeByte(command & 0xFF);
143
144 pixels.stepDithering();
145 pixels.advanceData();
146 }
148 mSPI.endTransaction();
149 }
void startBoundary() FL_NO_EXCEPT
Definition lpd880x.h:113
void endBoundary(int nLeds) FL_NO_EXCEPT
Definition lpd880x.h:114
LPD6803 controller class (LPD1101).
Definition lpd880x.h:109
VIRTUAL_IF_NOT_AVR int size() const FL_NO_EXCEPT
How many LEDs does this controller manage?

References endBoundary(), FASTLED_REGISTER, FL_NO_EXCEPT, mSPI, and startBoundary().

+ Here is the call graph for this function: