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:
@@ -4,9 +4,7 @@
|
||||
#include "irda.h"
|
||||
#include "irda_i.h"
|
||||
|
||||
|
||||
#define MATCH_TIMING(x, v, delta) ( ((x) < (v + delta)) \
|
||||
&& ((x) > (v - delta)))
|
||||
#define MATCH_TIMING(x, v, delta) (((x) < (v + delta)) && ((x) > (v - delta)))
|
||||
|
||||
typedef struct IrdaCommonDecoder IrdaCommonDecoder;
|
||||
typedef struct IrdaCommonEncoder IrdaCommonEncoder;
|
||||
@@ -18,9 +16,9 @@ typedef IrdaStatus (*IrdaCommonEncode)(IrdaCommonEncoder* encoder, uint32_t* out
|
||||
|
||||
typedef struct {
|
||||
IrdaTimings timings;
|
||||
bool manchester_start_from_space;
|
||||
bool no_stop_bit;
|
||||
uint8_t databit_len[4];
|
||||
bool manchester_start_from_space;
|
||||
bool no_stop_bit;
|
||||
uint8_t databit_len[4];
|
||||
IrdaCommonDecode decode;
|
||||
IrdaCommonDecodeRepeat decode_repeat;
|
||||
IrdaCommonInterpret interpret;
|
||||
@@ -66,18 +64,18 @@ struct IrdaCommonEncoder {
|
||||
uint8_t data[];
|
||||
};
|
||||
|
||||
IrdaMessage* irda_common_decode(IrdaCommonDecoder *decoder, bool level, uint32_t duration);
|
||||
IrdaMessage* irda_common_decode(IrdaCommonDecoder* decoder, bool level, uint32_t duration);
|
||||
IrdaStatus irda_common_decode_pdwm(IrdaCommonDecoder* decoder, bool level, uint32_t timing);
|
||||
IrdaStatus irda_common_decode_manchester(IrdaCommonDecoder* decoder, bool level, uint32_t timing);
|
||||
void* irda_common_decoder_alloc(const IrdaCommonProtocolSpec *protocol);
|
||||
void* irda_common_decoder_alloc(const IrdaCommonProtocolSpec* protocol);
|
||||
void irda_common_decoder_free(IrdaCommonDecoder* decoder);
|
||||
void irda_common_decoder_reset(IrdaCommonDecoder* decoder);
|
||||
IrdaMessage* irda_common_decoder_check_ready(IrdaCommonDecoder* decoder);
|
||||
|
||||
IrdaStatus irda_common_encode(IrdaCommonEncoder* encoder, uint32_t* duration, bool* polarity);
|
||||
IrdaStatus irda_common_encode_pdwm(IrdaCommonEncoder* encoder, uint32_t* duration, bool* polarity);
|
||||
IrdaStatus irda_common_encode_manchester(IrdaCommonEncoder* encoder, uint32_t* duration, bool* polarity);
|
||||
IrdaStatus
|
||||
irda_common_encode_manchester(IrdaCommonEncoder* encoder, uint32_t* duration, bool* polarity);
|
||||
void* irda_common_encoder_alloc(const IrdaCommonProtocolSpec* protocol);
|
||||
void irda_common_encoder_free(IrdaCommonEncoder* encoder);
|
||||
void irda_common_encoder_reset(IrdaCommonEncoder* encoder);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user