MCPcopy Create free account
hub / github.com/FastLED/FastLED / showPixels

Method showPixels

src/fl/chipsets/lpd880x.h:119–137  ·  view source on GitHub ↗

@copydoc CPixelLEDController::showPixels()

Source from the content-addressed store, hash-verified

117protected:
118 /// @copydoc CPixelLEDController::showPixels()
119 virtual void showPixels(PixelController<RGB_ORDER> & pixels) {
120 mSPI.select();
121
122 startBoundary();
123 while(pixels.has(1)) {
124 FASTLED_REGISTER fl::u16 command;
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 }
135 endBoundary(pixels.size());
136 mSPI.endTransaction();
137 }
138
139};
140

Callers

nothing calls this directly

Calls 7

selectMethod · 0.45
hasMethod · 0.45
writeByteMethod · 0.45
stepDitheringMethod · 0.45
advanceDataMethod · 0.45
sizeMethod · 0.45
endTransactionMethod · 0.45

Tested by

no test coverage detected