|
px-fwlib 0.10.0
Cross-platform embedded library and documentation for 8/16/32-bit microcontrollers generated with Doxygen 1.9.2
|
8-bit CRC (Cyclic Redundancy Check) calculator for checksums.
File(s):
A CRC is an error-detecting code that is used for data integrity checks.
Macros | |
| #define | PX_CRC8_POLYNOMIAL 0x07 |
| The generator polynomial CRC8 (normal representation): x^8 + x^2 + x + 1. More... | |
| #define | PX_CRC8_INIT_VAL 0x00 |
| Initial CRC value. More... | |
| #define | PX_CRC8_RAM_TABLE 0 |
| Generate table in RAM to speed up CRC calculation. More... | |
| #define | PX_CRC8_ROM_TABLE 0 |
| Use table in ROM to speed up CRC calculation. More... | |
Functions | |
| void | px_crc8_init (void) |
| Initialise 8-bit CRC calculator. More... | |
| uint8_t | px_crc8_update_u8 (uint8_t crc, uint8_t data) |
| Calculate the 8-bit CRC over one byte. More... | |
| uint8_t | px_crc8_update_data (uint8_t crc, const void *data, size_t nr_of_bytes) |
| Calculate the 8-bit CRC over a number of bytes. More... | |
| #define PX_CRC8_POLYNOMIAL 0x07 |
| #define PX_CRC8_RAM_TABLE 0 |
Generate table in RAM to speed up CRC calculation.
Definition at line 34 of file px_crc8_cfg_template.h.
| #define PX_CRC8_ROM_TABLE 0 |
Use table in ROM to speed up CRC calculation.
Definition at line 37 of file px_crc8_cfg_template.h.
| void px_crc8_init | ( | void | ) |
| uint8_t px_crc8_update_u8 | ( | uint8_t | crc, |
| uint8_t | data | ||
| ) |
| uint8_t px_crc8_update_data | ( | uint8_t | crc, |
| const void * | data, | ||
| size_t | nr_of_bytes | ||
| ) |
Calculate the 8-bit CRC over a number of bytes.
| crc | The initial CRC to start the calculation with |
| data | Pointer to the data to calculate the CRC over |
| nr_of_bytes | The amount of bytes to calculate the CRC over |