ECC repetition code. More...
ECC repetition code.
Definition in file repetition.h.
Go to the source code of this file.
#define | ECC_REPETITION_COUNT (3) |
Number of repetitions of a byte. | |
#define | DECODER_MAJORITY ((ECC_REPETITION_COUNT - 1) / 2) |
Calculates the majority according to the number of repetitions. | |
void | repetition_encode (unsigned int _dec_msg_len, unsigned char *_msg_dec, unsigned char *_msg_enc) |
encode block of data with ECC_REPETITION_COUNT number of repetitions | |
void | repetition_decode (unsigned int _dec_msg_len, unsigned char *_msg_enc, unsigned char *_msg_dec) |
decode block of data with ECC_REPETITION_COUNT repetitions | |
#define DECODER_MAJORITY ((ECC_REPETITION_COUNT - 1) / 2) |
Calculates the majority according to the number of repetitions.
Definition at line 48 of file repetition.h.
#define ECC_REPETITION_COUNT (3) |
Number of repetitions of a byte.
Definition at line 44 of file repetition.h.
void repetition_decode | ( | unsigned int | _dec_msg_len, |
unsigned char * | _msg_enc, | ||
unsigned char * | _msg_dec | ||
) |
decode block of data with ECC_REPETITION_COUNT repetitions
[in] | _dec_msg_len | decoded message length (number of bytes) |
[in] | _msg_enc | encoded message [size: 1 x ECC_REPETITION_COUNT*_dec_msg_len] |
[out] | _msg_dec | decoded message [size: 1 x _dec_msg_len] |
void repetition_encode | ( | unsigned int | _dec_msg_len, |
unsigned char * | _msg_dec, | ||
unsigned char * | _msg_enc | ||
) |
encode block of data with ECC_REPETITION_COUNT number of repetitions
[in] | _dec_msg_len | decoded message length (number of bytes) |
[in] | _msg_dec | decoded message [size: 1 x _dec_msg_len] |
[out] | _msg_enc | encoded message [size: 1 x ECC_REPETITION_COUNT*_dec_msg_len] |