/* * crc_calc.h * * Created: 2/15/2022 3:44:49 PM * Author: david */ #ifndef CRC_CALC_H_ #define CRC_CALC_H_ #define CRC8POLY (0x07) #define CRC32POLY (0x04C11DB7) #define MAX_CRC_TIME 20 // milliseconds typedef struct { uint32_t ul_tr_addr; uint32_t ul_tr_ctrl; uint32_t ul_reserved[2]; uint32_t ul_tr_crc; } crccu_dscr_type_t; uint8_t crc8(uint8_t initcrc, const uint8_t* input_data, uint32_t len); uint32_t crc32(uint32_t initcrc, const uint8_t* input_data, uint32_t len); uint32_t crc32_hw(const uint8_t* input_data, uint32_t len); #endif /* CRC_CALC_H_ */