1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 12:42:30 +04:00

infrared: add Kaseikyo IR protocol (#1965)

* infrared: add Kaseikyo IR protocol

Add Kaseikyo IR protocol support. This protocol is also called the Panasonic protocol and is used by a number of manufacturers including Denon.

The protocol includes a vendor field and a number of fields that are vendor specific. To support the format of address+command used by flipper the vendor+genre1+genre2+id fields are encoded into the address while the data is used for the command.

There are older versions of the protocol that used a reverse bit order that are not supported.

Protocol information:
- https://github.com/Arduino-IRremote/Arduino-IRremote/blob/master/src/ir_Kaseikyo.hpp
- http://www.hifi-remote.com/johnsfine/DecodeIR.html#Kaseikyo
- https://www.denon.com/-/media/files/documentmaster/denonna/avr-x3700h_avc-x3700h_ir_code_v01_04062020.doc

* Format and add unit test to Kaseikyo IR codec.

Co-authored-by: Georgii Surkov <37121527+gsurkov@users.noreply.github.com>
This commit is contained in:
Samuel Stauffer
2022-11-07 06:38:04 -08:00
committed by GitHub
parent 65005e71d2
commit aa2ecbe80f
9 changed files with 322 additions and 0 deletions

View File

@@ -110,6 +110,20 @@ static const InfraredEncoderDecoder infrared_encoder_decoder[] = {
.free = infrared_encoder_sirc_free},
.get_protocol_spec = infrared_sirc_get_spec,
},
{
.decoder =
{.alloc = infrared_decoder_kaseikyo_alloc,
.decode = infrared_decoder_kaseikyo_decode,
.reset = infrared_decoder_kaseikyo_reset,
.check_ready = infrared_decoder_kaseikyo_check_ready,
.free = infrared_decoder_kaseikyo_free},
.encoder =
{.alloc = infrared_encoder_kaseikyo_alloc,
.encode = infrared_encoder_kaseikyo_encode,
.reset = infrared_encoder_kaseikyo_reset,
.free = infrared_encoder_kaseikyo_free},
.get_protocol_spec = infrared_kaseikyo_get_spec,
},
};
static int infrared_find_index_by_protocol(InfraredProtocol protocol);