no-OS
crc8.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef __CRC8_H
40 #define __CRC8_H
41 
42 #include <stdint.h>
43 #include <stddef.h>
44 
45 #define CRC8_TABLE_SIZE 256
46 
47 #define DECLARE_CRC8_TABLE(_table) \
48  static uint8_t _table[CRC8_TABLE_SIZE]
49 
50 void crc8_populate_msb(uint8_t * table, const uint8_t polynomial);
51 uint8_t crc8(const uint8_t * table, const uint8_t *pdata, size_t nbytes,
52  uint8_t crc);
53 
54 #endif // __CRC8_H
crc8_populate_msb
void crc8_populate_msb(uint8_t *table, const uint8_t polynomial)
crc8
uint8_t crc8(const uint8_t *table, const uint8_t *pdata, size_t nbytes, uint8_t crc)