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

Class EdgeTime

src/fl/channels/rx.h:34–44  ·  view source on GitHub ↗

* @brief Universal edge timing representation (platform-agnostic) * * Represents a single edge transition with duration in nanoseconds. * RX devices convert their internal format (e.g., RMT ticks) to this * universal format for debugging and analysis. * * Memory layout: 32-bit packed bit field * - 31 bits: Duration in nanoseconds (max 2147483647ns ~= 2.1 seconds) * - 1 bit: High/low level

Source from the content-addressed store, hash-verified

32 * - Bit 1: {high: true, ns: 800}, {high: false, ns: 450}
33 */
34struct EdgeTime {
35 u32 ns : 31; ///< Duration in nanoseconds (31 bits, max ~2.1s)
36 u32 high : 1; ///< High/low level (1 bit: 1=high, 0=low)
37
38 /// Default constructor (low, 0ns)
39 constexpr EdgeTime() FL_NOEXCEPT : ns(0), high(0) {}
40
41 /// Construct from high/low state and duration
42 constexpr EdgeTime(bool high_level, u32 ns_duration) FL_NOEXCEPT
43 : ns(ns_duration), high(high_level ? 1 : 0) {}
44};
45
46/**
47 * @brief Edge range specification for getRawEdgeTimes() debugging

Callers 10

RmtRxChannelImplClass · 0.85
GpioIsrRxMcpwmClass · 0.85
pollOnceMethod · 0.85
waitMethod · 0.85
getEdgeFunction · 0.85
appendByteFunction · 0.85
FL_TEST_FILEFunction · 0.85
registerFunctionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected