|
|
| Rc5Codec () |
| | Constructor.
|
| |
| item_container_type | encode (uint16_t address, uint16_t command, bool repeat) override |
| | Encode an RC5 or RC5X frame (S2 = ~Cmd[6] when command ≥ 64)
|
| |
|
bool | decode (const gpio::m5_rmt_item_t *items, uint32_t num, DecodeResult &result) override |
| | Decode an RC5 / RC5X Manchester frame (14 bits including S1/S2/T)
|
| |
| uint32_t | carrierFrequencyHz () const override |
| | Carrier frequency for RC5 (36 kHz)
|
| |
| bool | toggle () const |
| | Toggle bit state (flipped on each new key press)
|
| |
| void | setToggle (bool t) |
| | Set toggle bit.
|
| |
|
void | flipToggle () |
| | Flip toggle bit (call on each new key press)
|
| |
|
| 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.
|
| |
Philips RC5 / RC5X IR protocol encoder/decoder.
- Carrier: 36 kHz, duty 1/3
- Modulation: Manchester (bi-phase)
- Bit order: MSB first
- RC5: S1(1) + S2(1) + Toggle(1) + Address(5) + Command(6) = 14 bits
- RC5X: S1(1) + S2=~Cmd6(1) + Toggle(1) + Address(5) + Command(6) = 14 bits, 128 commands
- 1 bit = 1778us (64 cycles of 36kHz), half-bit = 889us
- RC5 polarity: "0" = mark+space, "1" = space+mark