crc.h 477 B

123456789101112131415161718
  1. #ifndef _CRC_H_
  2. #define _CRC_H_
  3. #include <stdint.h>
  4. // crc16
  5. uint16_t crc16_update(uint16_t crc, uint8_t v);
  6. uint16_t crc16_calc(uint16_t crc, const uint8_t *data, uint32_t count);
  7. //uint16_t crc16_ccitt_update(uint16_t crc, uint8_t v);
  8. //uint16_t crc16_ccitt_calc(uint16_t crc, const uint8_t *data, uint32_t count);
  9. // crc32
  10. //uint32_t crc32_update(uint32_t crc, uint8_t v);
  11. //uint32_t crc32_calc(uint32_t crc, const uint8_t *data, uint32_t count);
  12. #endif /* _CRC_H_ */