| 311 | // write a block of uint8_ts out in groups of three. len is the total number of uint8_ts to write out. The template |
| 312 | // parameters indicate how many uint8_ts to skip at the beginning and/or end of each grouping |
| 313 | template <u8 FLAGS, class D, EOrder RGB_ORDER> void writePixels(PixelController<RGB_ORDER> pixels, void* context = nullptr) FL_NOEXCEPT { |
| 314 | //setSPIRate(); |
| 315 | int len = pixels.mLen; |
| 316 | |
| 317 | select(); |
| 318 | while(pixels.has(1)) { |
| 319 | if(FLAGS & FLAG_START_BIT) { |
| 320 | writeBit<0>(1); |
| 321 | writeBytePostWait(D::adjust(pixels.loadAndScale0())); |
| 322 | writeBytePostWait(D::adjust(pixels.loadAndScale1())); |
| 323 | writeBytePostWait(D::adjust(pixels.loadAndScale2())); |
| 324 | } else { |
| 325 | writeByte(D::adjust(pixels.loadAndScale0())); |
| 326 | writeByte(D::adjust(pixels.loadAndScale1())); |
| 327 | writeByte(D::adjust(pixels.loadAndScale2())); |
| 328 | } |
| 329 | |
| 330 | pixels.advanceData(); |
| 331 | pixels.stepDithering(); |
| 332 | } |
| 333 | D::postBlock(len); |
| 334 | waitFully(); |
| 335 | release(); |
| 336 | } |
| 337 | |
| 338 | /// Finalize transmission (no-op for AVR USART0 SPI) |
| 339 | /// This method exists for compatibility with other SPI implementations |
nothing calls this directly
no test coverage detected