mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-25 03:29:58 -07:00
Naming and coding style convention, new linter tool. (#945)
* Makefile, Scripts: new linter * About: remove ID from IC * Firmware: remove double define for DIVC/DIVR * Scripts: check folder names too. Docker: replace syntax check with make lint. * Reformat Sources and Migrate to new file naming convention * Docker: symlink clang-format-12 to clang-format * Add coding style guide
This commit is contained in:
@@ -2,37 +2,36 @@
|
||||
#include "irda_protocol_defs_i.h"
|
||||
|
||||
static const IrdaProtocolSpecification irda_sirc_protocol_specification = {
|
||||
.name = "SIRC",
|
||||
.address_length = 5,
|
||||
.command_length = 7,
|
||||
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
||||
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
||||
.name = "SIRC",
|
||||
.address_length = 5,
|
||||
.command_length = 7,
|
||||
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
||||
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
||||
};
|
||||
|
||||
static const IrdaProtocolSpecification irda_sirc15_protocol_specification = {
|
||||
.name = "SIRC15",
|
||||
.address_length = 8,
|
||||
.command_length = 7,
|
||||
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
||||
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
||||
.name = "SIRC15",
|
||||
.address_length = 8,
|
||||
.command_length = 7,
|
||||
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
||||
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
||||
};
|
||||
|
||||
static const IrdaProtocolSpecification irda_sirc20_protocol_specification = {
|
||||
.name = "SIRC20",
|
||||
.address_length = 13,
|
||||
.command_length = 7,
|
||||
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
||||
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
||||
.name = "SIRC20",
|
||||
.address_length = 13,
|
||||
.command_length = 7,
|
||||
.frequency = IRDA_SIRC_CARRIER_FREQUENCY,
|
||||
.duty_cycle = IRDA_SIRC_DUTY_CYCLE,
|
||||
};
|
||||
|
||||
const IrdaProtocolSpecification* irda_sirc_get_spec(IrdaProtocol protocol) {
|
||||
if (protocol == IrdaProtocolSIRC)
|
||||
if(protocol == IrdaProtocolSIRC)
|
||||
return &irda_sirc_protocol_specification;
|
||||
else if (protocol == IrdaProtocolSIRC15)
|
||||
else if(protocol == IrdaProtocolSIRC15)
|
||||
return &irda_sirc15_protocol_specification;
|
||||
else if (protocol == IrdaProtocolSIRC20)
|
||||
else if(protocol == IrdaProtocolSIRC20)
|
||||
return &irda_sirc20_protocol_specification;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user