@brief Runtime bit-period timing for a clockless chipset Pure timing — no encoder field. The byte-level encoder pipeline lives on `ClocklessChipset` as a peer field.
| 20 | /// Pure timing — no encoder field. The byte-level encoder pipeline lives on |
| 21 | /// `ClocklessChipset` as a peer field. |
| 22 | struct ChipsetTimingConfig { |
| 23 | constexpr ChipsetTimingConfig() FL_NOEXCEPT |
| 24 | : t1_ns(0), t2_ns(0), t3_ns(0), reset_us(0), name("UNSET") {} |
| 25 | constexpr ChipsetTimingConfig(u32 t1, u32 t2, u32 t3, u32 reset, |
| 26 | const char* name = "UNNAMED CHIPSET") FL_NOEXCEPT |
| 27 | : t1_ns(t1), t2_ns(t2), t3_ns(t3), reset_us(reset), name(name) {} |
| 28 | |
| 29 | u32 t1_ns; ///< T0H: High time for bit 0 (nanoseconds) |
| 30 | u32 t2_ns; ///< T1H-T0H: Additional high time for bit 1 (nanoseconds) |
| 31 | u32 t3_ns; ///< T0L: Low tail duration (nanoseconds) |
| 32 | u32 reset_us; ///< Reset/latch time (microseconds) |
| 33 | const char* name; ///< Human-readable chipset name |
| 34 | |
| 35 | /// @brief Get total bit period (T1 + T2 + T3) |
| 36 | constexpr u32 total_period_ns() const FL_NOEXCEPT { |
| 37 | return t1_ns + t2_ns + t3_ns; |
| 38 | } |
| 39 | |
| 40 | /// @brief Equality operator (all timing fields participate; name ignored) |
| 41 | constexpr bool operator==(const ChipsetTimingConfig& other) const FL_NOEXCEPT { |
| 42 | return t1_ns == other.t1_ns && |
| 43 | t2_ns == other.t2_ns && |
| 44 | t3_ns == other.t3_ns && |
| 45 | reset_us == other.reset_us; |
| 46 | } |
| 47 | |
| 48 | /// @brief Inequality operator |
| 49 | constexpr bool operator!=(const ChipsetTimingConfig& other) const FL_NOEXCEPT { |
| 50 | return !(*this == other); |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | /// @brief Convert compile-time CHIPSET type to runtime timing config |
| 55 | /// |
no outgoing calls
no test coverage detected