M5Unit-INFRARED 0.2.0 git rev:76ad9e1
Loading...
Searching...
No Matches
m5::unit::UnitIR::config_t Struct Reference

Settings for begin. More...

#include <unit_IR.hpp>

Public Attributes

uint32_t tick_ns {1000}
 RMT tick resolution in nanoseconds (default: 1000 = 1us)
 
uint16_t rx_ring_buffer_size {1024}
 RX ring buffer size in bytes.
 
uint16_t rx_idle_threshold {20000}
 
uint16_t rx_filter_threshold {200}
 
uint8_t rx_min_item_count {2}
 
bool rx_invert_level {true}
 

Detailed Description

Settings for begin.

Member Data Documentation

◆ rx_filter_threshold

uint16_t m5::unit::UnitIR::config_t::rx_filter_threshold {200}

RX noise filter threshold in ticks

Note
Filters glitches shorter than this value. 200us is safe for IR signals.

◆ rx_idle_threshold

uint16_t m5::unit::UnitIR::config_t::rx_idle_threshold {20000}

RX idle threshold in ticks (signal gap indicating end of frame)

Note
Default 20000us is sufficient for all standard IR protocols. NEC full frame ~67.5ms but inter-frame gap detection needs ~10-20ms.

◆ rx_invert_level

bool m5::unit::UnitIR::config_t::rx_invert_level {true}

Invert RX signal levels for active-LOW receivers

Note
Most IR receivers (VS1838B on Unit IR, and most built-in IR receivers such as StickS3) are active-LOW, so the default true is correct.

◆ rx_min_item_count

uint8_t m5::unit::UnitIR::config_t::rx_min_item_count {2}

Minimum RMT items for a valid frame (noise filter)

Note
Frames with fewer items are silently discarded. NEC=34, SIRC=13+, RC5=14, RC6=22+, Panasonic=50