| 490 | // write a block of uint8_ts out in groups of three. len is the total number of uint8_ts to write out. The template |
| 491 | // parameters indicate how many uint8_ts to skip at the beginning and/or end of each grouping |
| 492 | template <u8 FLAGS, class D, EOrder RGB_ORDER> void writePixels(PixelController<RGB_ORDER> pixels, void* context = nullptr) FL_NOEXCEPT { |
| 493 | //setSPIRate(); |
| 494 | int len = pixels.mLen; |
| 495 | |
| 496 | select(); |
| 497 | while(pixels.has(1)) { |
| 498 | if(FLAGS & FLAG_START_BIT) { |
| 499 | writeBit<0>(1); |
| 500 | writeBytePostWait(D::adjust(pixels.loadAndScale0())); |
| 501 | writeBytePostWait(D::adjust(pixels.loadAndScale1())); |
| 502 | writeBytePostWait(D::adjust(pixels.loadAndScale2())); |
| 503 | } else { |
| 504 | writeByte(D::adjust(pixels.loadAndScale0())); |
| 505 | writeByte(D::adjust(pixels.loadAndScale1())); |
| 506 | writeByte(D::adjust(pixels.loadAndScale2())); |
| 507 | } |
| 508 | |
| 509 | pixels.advanceData(); |
| 510 | pixels.stepDithering(); |
| 511 | } |
| 512 | D::postBlock(len); |
| 513 | release(); |
| 514 | } |
| 515 | |
| 516 | /// Finalize transmission (no-op for AVR Hardware SPI) |
| 517 | /// This method exists for compatibility with other SPI implementations |
nothing calls this directly
no test coverage detected