FastLED 3.10.8
Loading...
Searching...
No Matches

◆ flexPwmBitFromHigh()

int fl::channels::rx::flexPwmBitFromHigh ( u32 high_ns,
const ChipsetTiming4Phase & timing )
inline

Bit from a HIGH whose LOW was a gap/reset or was not captured: range check against the T0H / T1H windows.

Returns -1 when outside both.

Definition at line 76 of file ws2812_stream_decoder.h.

76 {
77 if (high_ns >= timing.t0h_min_ns && high_ns <= timing.t0h_max_ns) {
78 return 0;
79 }
80 if (high_ns >= timing.t1h_min_ns && high_ns <= timing.t1h_max_ns) {
81 return 1;
82 }
83 return -1;
84}
u32 t1h_min_ns
Bit 1 high time minimum (e.g., 650ns)
Definition rx.h:96
u32 t1h_max_ns
Bit 1 high time maximum (e.g., 950ns)
Definition rx.h:97
u32 t0h_min_ns
Bit 0 high time minimum (e.g., 250ns)
Definition rx.h:90
u32 t0h_max_ns
Bit 0 high time maximum (e.g., 550ns)
Definition rx.h:91

References fl::FL_NO_EXCEPT.

Referenced by fl::channels::rx::Ws2812StreamDecoder::classify(), decodeFlexPwmEdges(), and fl::channels::rx::Ws2812StreamDecoder::finish().

+ Here is the caller graph for this function: