flipperzero-firmware/lib/infrared/encoder_decoder/kaseikyo/infrared_kaseikyo_spec.c
Samuel Stauffer aa2ecbe80f
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>
2022-11-07 18:38:04 +04:00

18 lines
560 B
C

#include "../infrared_i.h"
#include "infrared_protocol_defs_i.h"
static const InfraredProtocolSpecification infrared_kaseikyo_protocol_specification = {
.name = "Kaseikyo",
.address_length = 26,
.command_length = 10,
.frequency = INFRARED_COMMON_CARRIER_FREQUENCY,
.duty_cycle = INFRARED_COMMON_DUTY_CYCLE,
};
const InfraredProtocolSpecification* infrared_kaseikyo_get_spec(InfraredProtocol protocol) {
if(protocol == InfraredProtocolKaseikyo)
return &infrared_kaseikyo_protocol_specification;
else
return NULL;
}