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

◆ flexPwmTickDeltaNs()

u32 fl::channels::rx::flexPwmTickDeltaNs ( u16 t0,
u16 t1,
u32 ns_per_tick_q16 )
inline

Convert a 16-bit capture-counter delta to ns.

Unsigned 16-bit subtraction handles a counter wrap inside the pulse. ns_per_tick_q16 is (1e9 / counter_hz) in Q16.16.

Definition at line 89 of file ws2812_stream_decoder.h.

89 {
90 const u16 delta = static_cast<u16>(t1 - t0);
91 return static_cast<u32>((static_cast<u64>(delta) * ns_per_tick_q16) >> 16);
92}
fl::u64 u64
Definition stdint.h:220

References fl::FL_NO_EXCEPT.

Referenced by fl::channels::rx::Ws2812StreamDecoder::emitPair(), fl::channels::rx::Ws2812StreamDecoder::flush(), and fl::channels::rx::Ws2812StreamDecoder::push().

+ Here is the caller graph for this function: