|
|
| PanasonicCodec () |
| | Constructor.
|
| |
| item_container_type | encode (uint16_t address, uint16_t command, bool repeat) override |
| | Encode a 48-bit Panasonic frame from (manufacturer=address, device+function=command)
|
| |
|
bool | decode (const gpio::m5_rmt_item_t *items, uint32_t num, DecodeResult &result) override |
| | Decode a 48-bit Panasonic frame; result.raw receives the full 48-bit value.
|
| |
| uint32_t | carrierFrequencyHz () const override |
| | Carrier frequency for Panasonic (36.7 kHz)
|
| |
| item_container_type | encodeRaw48 (uint64_t data48) |
| | Encode with explicit 48-bit raw data.
|
| |
|
| 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.
|
| |
Panasonic (Kaseikyo) 48-bit IR protocol encoder/decoder.
- Carrier: 36.7 kHz, duty 1/3
- Modulation: Pulse Distance (same as NEC)
- Bit order: LSB first
- 48 bits: Customer Code (16) + Data (32)
- Customer code for Panasonic TV: 0x4004
- Data: device(8) + subdevice(8) + function(8) + checksum(8)
- Timing
| Element | Mark (us) | Space (us) |
| Leader | 3500 | 1750 |
| Bit "1" | 425 | 1275 |
| Bit "0" | 425 | 425 |
| Stop | 425 | - |
- API mapping (simple
encode(address, command, repeat))
- address = manufacturer / customer code (e.g. 0x4004 for Panasonic TV)
- command =
(device << 8) | function, subdevice is fixed to 0
- checksum =
device ^ subdevice ^ function (auto-computed)
- result.raw (decode) holds the full 48-bit frame for post-processing.
For full control (non-zero subdevice, custom manufacturer codes), use the static helper encodePanasonic(manufacturer, device, subdevice, function) and feed the returned 48-bit value to encodeRaw48().