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

Function sendBit1

src/platforms/shared/clockless_blocking.h:172–183  ·  view source on GitHub ↗

Send a '1' bit with correct WS2812 timing T1H (high time for 1-bit) = T1+T2, T1L (low time) = T3

Source from the content-addressed store, hash-verified

170 /// Send a '1' bit with correct WS2812 timing
171 /// T1H (high time for 1-bit) = T1+T2, T1L (low time) = T3
172 FASTLED_FORCE_INLINE static void sendBit1()
173 {
174 // Set line HIGH
175 fl::FastPin<DATA_PIN>::hi();
176 // Hold high for T1+T2 nanoseconds (e.g., 875ns for WS2812)
177 fl::delayNanoseconds<T1 + T2>();
178
179 // Set line LOW
180 fl::FastPin<DATA_PIN>::lo();
181 // Hold low for T3 nanoseconds (e.g., 375ns for WS2812)
182 fl::delayNanoseconds<T3>();
183 }
184
185 /// Send a '0' bit with correct WS2812 timing
186 /// T0H (high time for 0-bit) = T1, T0L (low time) = T2+T3

Callers 1

sendByteFunction · 0.85

Calls 2

hiFunction · 0.50
loFunction · 0.50

Tested by

no test coverage detected