* @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
| 32 | * - Bit 1: {high: true, ns: 800}, {high: false, ns: 450} |
| 33 | */ |
| 34 | struct 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 |
no outgoing calls
no test coverage detected