| 66 | |
| 67 | /// A full cycle of writing a value for len bytes, including select, release, and waiting |
| 68 | template <class D> void writeBytes(FASTLED_REGISTER fl::u8 *data, int len) { |
| 69 | fl::u8 *end = data + len; |
| 70 | select(); |
| 71 | // could be optimized to write 16bit words out instead of 8bit bytes |
| 72 | while(data != end) { |
| 73 | writeByte(D::adjust(*data++)); |
| 74 | } |
| 75 | D::postBlock(len); |
| 76 | waitFully(); |
| 77 | release(); |
| 78 | } |
| 79 | |
| 80 | /// A full cycle of writing a value for len bytes, including select, release, and waiting |
| 81 | void writeBytes(FASTLED_REGISTER fl::u8 *data, int len) { writeBytes<DATA_NOP>(data, len); } |