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

Function ws2812_timing

tests/fl/channels/rx_sct_capture.cpp:40–49  ·  view source on GitHub ↗

WS2812B 4-phase decoder timings. Same nominal values as `WS2812Chipset`: T0H = 400 ns, T0L = 850 ns, T1H = 800 ns, T1L = 450 ns. We use ±150 ns tolerance so an idealised generator (no jitter) is comfortably inside the window without making bit-1 / bit-0 ambiguous.

Source from the content-addressed store, hash-verified

38// We use ±150 ns tolerance so an idealised generator (no jitter) is
39// comfortably inside the window without making bit-1 / bit-0 ambiguous.
40ChipsetTiming4Phase ws2812_timing() {
41 ChipsetTiming4Phase t{};
42 t.t0h_min_ns = 250; t.t0h_max_ns = 550;
43 t.t0l_min_ns = 700; t.t0l_max_ns = 1000;
44 t.t1h_min_ns = 650; t.t1h_max_ns = 950;
45 t.t1l_min_ns = 300; t.t1l_max_ns = 600;
46 t.reset_min_us = 50;
47 t.gap_tolerance_ns = 0;
48 return t;
49}
50
51// Emit one byte's worth of edge pairs (MSB first) into the buffer.
52template <fl::size N>

Callers 1

FL_TEST_FILEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected