A collection of error correction code (ECC) algorithms. More...
A collection of error correction code (ECC) algorithms.
Files | |
file | golay2412.h |
Golay(24,12) half-rate forward error-correction code. | |
file | repetition.h |
ECC repetition code. | |
#define | Hamming_ERROR_NONE 0 |
Hamming Code implementation for 256byte data segments. More... | |
#define | Hamming_ERROR_SINGLEBIT 1 |
A single bit was incorrect but has been recovered. | |
#define | Hamming_ERROR_ECC 2 |
The original code has been corrupted. | |
#define | Hamming_ERROR_MULTIPLEBITS 3 |
Multiple bits are incorrect in the data and they cannot be corrected. | |
void | hamming_compute256x (const uint8_t *data, uint32_t size, uint8_t *code) |
Computes 3-bytes hamming codes for a data block whose size is multiple of 256 bytes. More... | |
uint8_t | hamming_verify256x (uint8_t *data, uint32_t size, const uint8_t *code) |
Verifies 3-bytes hamming codes for a data block whose size is multiple of 256 bytes. More... | |
#define Hamming_ERROR_NONE 0 |
Hamming Code implementation for 256byte data segments.
Definition at line 29 of file hamming256.h.
void hamming_compute256x | ( | const uint8_t * | data, |
uint32_t | size, | ||
uint8_t * | code | ||
) |
Computes 3-bytes hamming codes for a data block whose size is multiple of 256 bytes.
Each 256 bytes block gets its own code.
[in] | data | Data to compute code for. |
[in] | size | Data size in bytes. |
[out] | code | Codes buffer. |
uint8_t hamming_verify256x | ( | uint8_t * | data, |
uint32_t | size, | ||
const uint8_t * | code | ||
) |
Verifies 3-bytes hamming codes for a data block whose size is multiple of 256 bytes.
Each 256-bytes block is verified with its own code.
[in] | data | Data buffer to verify. |
[in] | size | Size of the data in bytes. |
[in] | code | Original codes. |