Send raw pixel data with precise timing
| 135 | private: |
| 136 | /// Send raw pixel data with precise timing |
| 137 | FASTLED_FORCE_INLINE static void sendPixelData(PixelController<RGB_ORDER> & pixels) |
| 138 | { |
| 139 | // Get color component order |
| 140 | u16 pixel_count = pixels.mLen; |
| 141 | u8 *data = (u8 *)pixels.mData; |
| 142 | |
| 143 | // Iterate through all bytes in all pixels |
| 144 | for (u16 i = 0; i < pixel_count * 3; ++i) { |
| 145 | u8 byte = data[i]; |
| 146 | sendByte(byte); |
| 147 | } |
| 148 | |
| 149 | // Send reset code: line low for at least 50µs |
| 150 | // (WS2812/SK6812 datasheet requirement) |
| 151 | fl::FastPin<DATA_PIN>::lo(); |
| 152 | fl::delayNanoseconds<280000>(); // 280 microseconds |
| 153 | } |
| 154 | |
| 155 | /// Send a single byte with bit-by-bit timing |
| 156 | FASTLED_FORCE_INLINE static void sendByte(u8 byte) |
no test coverage detected