5#include "platforms/is_platform.h"
8#include "platforms/shared/rx_device_dummy.h"
15#include "platforms/esp/32/drivers/rmt_rx/rmt_rx_channel.h"
16#include "platforms/esp/32/drivers/gpio_isr_rx/gpio_isr_rx.h"
22#include "platforms/arm/teensy/teensy4_common/rx_flexio_channel.h"
23#include "platforms/arm/teensy/teensy4_common/rx_flexpwm_channel.h"
29#include "platforms/shared/rx_device_native.h"
36#include "platforms/arm/lpc/rx_sct_capture.h"
45 "RX devices not supported on this platform"
57 u32 t0h = timing_3phase.T1;
58 u32 t0l = timing_3phase.T2 + timing_3phase.T3;
59 u32 t1h = timing_3phase.T1 + timing_3phase.T2;
60 u32 t1l = timing_3phase.T3;
65 result.t0h_min_ns = (t0h > tolerance_ns) ? (t0h - tolerance_ns) : 0;
66 result.t0h_max_ns = t0h + tolerance_ns;
67 result.t0l_min_ns = (t0l > tolerance_ns) ? (t0l - tolerance_ns) : 0;
68 result.t0l_max_ns = t0l + tolerance_ns;
71 result.t1h_min_ns = (t1h > tolerance_ns) ? (t1h - tolerance_ns) : 0;
72 result.t1h_max_ns = t1h + tolerance_ns;
73 result.t1l_min_ns = (t1l > tolerance_ns) ? (t1l - tolerance_ns) : 0;
74 result.t1l_max_ns = t1l + tolerance_ns;
77 result.reset_min_us = timing_3phase.RESET;
96 auto device = RmtRxChannel::create(pin);
106 auto device = GpioIsrRx::create(pin);
140#elif defined(FL_IS_TEENSY_4X)
145 auto device = FlexPwmRxChannel::create(pin);
157 auto device = FlexIoRxChannel::create(pin);
192#elif defined(FL_IS_ARM_LPC)
197 auto device = LpcSctRxChannel::create(pin);
238#elif defined(FL_IS_STUB)
243 return NativeRxDevice::create(pin);
249 return NativeRxDevice::create(pin);
255 return NativeRxDevice::create(pin);
263 return NativeRxDevice::create(pin);
271 return NativeRxDevice::create(pin);
static fl::shared_ptr< RxDevice > createDummy() FL_NOEXCEPT
Create dummy RxDevice instance (default fallback)
static fl::shared_ptr< RxDevice > create(int pin) FL_NOEXCEPT
Template factory method to create RX device by type.
Centralized LED chipset timing definitions with nanosecond precision.
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
ChipsetTiming4Phase make4PhaseTiming(const ChipsetTiming &timing_3phase, u32 tolerance_ns) FL_NOEXCEPT
Create 4-phase RX timing from 3-phase chipset timing with tolerance.
Base definition for an LED controller.
4-phase RX timing thresholds for chipset detection
Generic chipset timing entry Provides T1, T2, T3 timing parameters in nanoseconds for any LED protoco...
Common RX interfaces and shared types.