MCPcopy Create free account
hub / github.com/FastLED/FastLED / sendByte

Function sendByte

src/platforms/shared/clockless_blocking.h:156–168  ·  view source on GitHub ↗

Send a single byte with bit-by-bit timing

Source from the content-addressed store, hash-verified

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

Calls 2

sendBit1Function · 0.85
sendBit0Function · 0.85

Tested by

no test coverage detected