CRC16.h 458 B

123456789101112131415161718192021222324
  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. uint16_t CRC16_Generate(uint8_t *buf_ptr, int32_t len);
  15. etError CRC16_Check(uint8_t *buf_ptr, int32_t len,uint16_t checksum);
  16. uint8_t STH30_CreateCrc(uint8_t *data, uint8_t nbrOfBytes);
  17. uint8_t STH30_CreateCrc(uint8_t *data, uint8_t nbrOfBytes);
  18. #endif /* CRC16_H_ */