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:
あく
2022-01-05 19:10:18 +03:00
committed by GitHub
parent c98e54da10
commit 389ff92cc1
899 changed files with 379245 additions and 373421 deletions

View File

@@ -6,7 +6,6 @@
#include <furi.h>
#include "../irda_i.h"
IrdaMessage* irda_decoder_sirc_check_ready(void* ctx) {
return irda_common_decoder_check_ready(ctx);
}
@@ -14,21 +13,21 @@ IrdaMessage* irda_decoder_sirc_check_ready(void* ctx) {
bool irda_decoder_sirc_interpret(IrdaCommonDecoder* decoder) {
furi_assert(decoder);
uint32_t* data = (void*) &decoder->data[0];
uint32_t* data = (void*)&decoder->data[0];
uint16_t address = 0;
uint8_t command = 0;
IrdaProtocol protocol = IrdaProtocolUnknown;
if (decoder->databit_cnt == 12) {
address = (*data >> 7) & 0x1F;
if(decoder->databit_cnt == 12) {
address = (*data >> 7) & 0x1F;
command = *data & 0x7F;
protocol = IrdaProtocolSIRC;
} else if (decoder->databit_cnt == 15) {
address = (*data >> 7) & 0xFF;
} else if(decoder->databit_cnt == 15) {
address = (*data >> 7) & 0xFF;
command = *data & 0x7F;
protocol = IrdaProtocolSIRC15;
} else if (decoder->databit_cnt == 20) {
address = (*data >> 7) & 0x1FFF;
} else if(decoder->databit_cnt == 20) {
address = (*data >> 7) & 0x1FFF;
command = *data & 0x7F;
protocol = IrdaProtocolSIRC20;
} else {
@@ -59,4 +58,3 @@ void irda_decoder_sirc_free(void* decoder) {
void irda_decoder_sirc_reset(void* decoder) {
irda_common_decoder_reset(decoder);
}