@copydoc CPixelLEDController::showPixels()
| 117 | protected: |
| 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 |
nothing calls this directly
no test coverage detected