Send a single byte with bit-by-bit timing
| 154 | |
| 155 | /// Send a single byte with bit-by-bit timing |
| 156 | FASTLED_FORCE_INLINE static void sendByte(u8 byte) |
| 157 | { |
| 158 | // Send bits MSB first (standard for most LED protocols) |
| 159 | for (int bit = 7; bit >= 0; --bit) { |
| 160 | bool is_one = (byte & (1 << bit)) != 0; |
| 161 | |
| 162 | if (is_one) { |
| 163 | sendBit1(); |
| 164 | } else { |
| 165 | sendBit0(); |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | /// Send a '1' bit with correct WS2812 timing |
| 171 | /// T1H (high time for 1-bit) = T1+T2, T1L (low time) = T3 |
no test coverage detected