| 160 | // write a block of uint8_ts out in groups of three. len is the total number of uint8_ts to write out. The template |
| 161 | // parameters indicate how many uint8_ts to skip at the beginning and/or end of each grouping |
| 162 | template <u8 FLAGS, class D, EOrder RGB_ORDER> void writePixels(PixelController<RGB_ORDER> pixels, void* context = nullptr) FL_NOEXCEPT { |
| 163 | //setSPIRate(); |
| 164 | int len = pixels.mLen; |
| 165 | |
| 166 | select(); |
| 167 | while(pixels.has(1)) { |
| 168 | if(FLAGS & FLAG_START_BIT) { |
| 169 | writeBit<0>(1); |
| 170 | writeBytePostWait(D::adjust(pixels.loadAndScale0())); |
| 171 | writeBytePostWait(D::adjust(pixels.loadAndScale1())); |
| 172 | writeBytePostWait(D::adjust(pixels.loadAndScale2())); |
| 173 | } else { |
| 174 | writeByte(D::adjust(pixels.loadAndScale0())); |
| 175 | writeByte(D::adjust(pixels.loadAndScale1())); |
| 176 | writeByte(D::adjust(pixels.loadAndScale2())); |
| 177 | } |
| 178 | |
| 179 | pixels.advanceData(); |
| 180 | pixels.stepDithering(); |
| 181 | } |
| 182 | D::postBlock(len); |
| 183 | release(); |
| 184 | } |
| 185 | }; |
| 186 | #endif |
| 187 |
nothing calls this directly
no test coverage detected