|
| | SircCodec (Variant v=Variant::SIRC12) |
| | Constructor.
|
| |
| item_container_type | encode (uint16_t address, uint16_t command, bool repeat) override |
| | Encode a Sony SIRC frame for the currently selected variant.
|
| |
|
bool | decode (const gpio::m5_rmt_item_t *items, uint32_t num, DecodeResult &result) override |
| | Decode a Sony SIRC frame and, on success, sync the active variant.
|
| |
| uint32_t | carrierFrequencyHz () const override |
| | Carrier frequency for Sony SIRC (40 kHz)
|
| |
| uint8_t | minFrames () const override |
| | Sony SIRC requires the frame to be sent at least 3 times per keypress.
|
| |
| uint16_t | frameGapUs () const override |
| | Inter-frame gap ≈ 30 ms (keeps the 45 ms start-to-start cycle)
|
| |
| Variant | variant () const |
| | Get current variant.
|
| |
| void | setVariant (Variant v) |
| | Set variant (12 / 15 / 20-bit)
|
| |
|
| IRCodec (CodecType t) |
| |
| CodecType | type () const |
| | Get codec type for safe downcasting.
|
| |
| virtual float | carrierDuty () const |
| | Carrier duty cycle (0.0 - 1.0)
|
| |
| 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.
|
| |
Sony SIRC IR protocol encoder/decoder.
- Carrier: 40 kHz, duty 1/3
- Modulation: Pulse Width (space constant, mark varies)
- Bit order: LSB first
- 12-bit: 7-bit command + 5-bit address
- 15-bit: 7-bit command + 8-bit address
- 20-bit: 7-bit command + 5-bit address + 8-bit extended
- Timing
| Element | Mark (us) | Space (us) |
| Start | 2400 | 600 |
| Bit "1" | 1200 | 600 |
| Bit "0" | 600 | 600 |