CRC16.h 561 B

1234567891011121314151617181920212223242526
  1. /*
  2. * CRC16.h
  3. *
  4. * Created on: 2019. 7. 3.
  5. * Author: parkyj
  6. */
  7. #ifndef CRC16_H_
  8. #define CRC16_H_
  9. #include "main.h"
  10. typedef enum{
  11. CHECKSUM_ERROR = 0,
  12. NO_ERROR
  13. }etError;
  14. bool Chksum_Check(uint8_t *data, uint32_t leng,uint8_t chkdata);
  15. uint8_t Chksum_Create(uint8_t *data);
  16. uint16_t CRC16_Generate(uint8_t *buf_ptr, int32_t len);
  17. etError CRC16_Check(uint8_t *buf_ptr, int32_t len,uint16_t checksum);
  18. uint8_t STH30_CreateCrc(uint8_t *data, uint8_t nbrOfBytes);
  19. uint8_t STH30_CreateCrc(uint8_t *data, uint8_t nbrOfBytes);
  20. #endif /* CRC16_H_ */