2021-09-09 21:37:32 +00:00
|
|
|
#include "../irda_i.h"
|
|
|
|
#include "irda_protocol_defs_i.h"
|
|
|
|
|
|
|
|
static const IrdaProtocolSpecification irda_sirc_protocol_specification = {
|
2022-01-05 16:10:18 +00:00
|
|
|
.name = "SIRC",
|
|
|
|
.address_length = 5,
|
|
|
|
.command_length = 7,
|
|
|
|
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
|
|
|
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
2021-09-09 21:37:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const IrdaProtocolSpecification irda_sirc15_protocol_specification = {
|
2022-01-05 16:10:18 +00:00
|
|
|
.name = "SIRC15",
|
|
|
|
.address_length = 8,
|
|
|
|
.command_length = 7,
|
|
|
|
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
|
|
|
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
2021-09-09 21:37:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const IrdaProtocolSpecification irda_sirc20_protocol_specification = {
|
2022-01-05 16:10:18 +00:00
|
|
|
.name = "SIRC20",
|
|
|
|
.address_length = 13,
|
|
|
|
.command_length = 7,
|
|
|
|
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
|
|
|
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
2021-09-09 21:37:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const IrdaProtocolSpecification* irda_sirc_get_spec(IrdaProtocol protocol) {
|
2022-01-05 16:10:18 +00:00
|
|
|
if(protocol == IrdaProtocolSIRC)
|
2021-09-09 21:37:32 +00:00
|
|
|
return &irda_sirc_protocol_specification;
|
2022-01-05 16:10:18 +00:00
|
|
|
else if(protocol == IrdaProtocolSIRC15)
|
2021-09-09 21:37:32 +00:00
|
|
|
return &irda_sirc15_protocol_specification;
|
2022-01-05 16:10:18 +00:00
|
|
|
else if(protocol == IrdaProtocolSIRC20)
|
2021-09-09 21:37:32 +00:00
|
|
|
return &irda_sirc20_protocol_specification;
|
|
|
|
else
|
|
|
|
return NULL;
|
|
|
|
}
|