|
M5Unit-INFRARED 0.2.0 git rev:76ad9e1
|
Auto-detecting multi-protocol IR decoder. More...
#include <auto_detect_codec.hpp>
Public Member Functions | |
| AutoDetectCodec () | |
| Constructor. | |
| item_container_type | encode (uint16_t address, uint16_t command, bool repeat) override |
| Encode using the last detected protocol's codec (default: NEC) | |
| bool | decode (const gpio::m5_rmt_item_t *items, uint32_t num, DecodeResult &result) override |
| Try decoding with each protocol codec in priority order. | |
| uint32_t | carrierFrequencyHz () const override |
| Carrier frequency of the last detected protocol. | |
| IRCodec * | lastCodec () |
| Get the codec that last successfully decoded. | |
Access individual codecs | |
| NecCodec & | nec () |
| Get NEC codec instance. | |
| SircCodec & | sirc () |
| Get Sony SIRC codec instance. | |
| Rc5Codec & | rc5 () |
| Get Philips RC5 codec instance. | |
| Rc6Codec & | rc6 () |
| Get Philips RC6 codec instance. | |
| PanasonicCodec & | panasonic () |
| Get Panasonic / Kaseikyo codec instance. | |
| MitsubishiCodec & | mitsubishi () |
| Get Mitsubishi codec instance. | |
Public Member Functions inherited from m5::unit::ir::IRCodec | |
| IRCodec (CodecType t) | |
| CodecType | type () const |
| Get codec type for safe downcasting. | |
| virtual float | carrierDuty () const |
| Carrier duty cycle (0.0 - 1.0) | |
| virtual uint8_t | minFrames () const |
| Number of frames that should be transmitted per keypress for this protocol. | |
| virtual uint16_t | frameGapUs () const |
| Inter-frame gap (microseconds) when transmitting multiple frames in one burst. | |
| virtual bool | decode (const m5::unit::gpio::m5_rmt_item_t *items, uint32_t num, DecodeResult &result)=0 |
| Try to decode RMT items into an IR command. | |
Auto-detecting multi-protocol IR decoder.
Tries multiple IR protocols in order during decode(). Detection priority:
For encode(), delegates to the codec matching the last successfully decoded protocol, defaulting to NEC.
|
inlineoverridevirtual |
Carrier frequency of the last detected protocol.
Implements m5::unit::ir::IRCodec.
|
override |
Try decoding with each protocol codec in priority order.
| items | RMT items from receiver | |
| num | Number of items | |
| [out] | result | Populated when a protocol matches |
|
inlineoverridevirtual |
Encode using the last detected protocol's codec (default: NEC)
| address | Device address for the target protocol |
| command | Command code for the target protocol |
| repeat | True to emit the repeat frame (only NEC has a dedicated one) |
Implements m5::unit::ir::IRCodec.