Added crc files
This commit is contained in:
22
crc8.h
Normal file
22
crc8.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* crc.h
|
||||
*
|
||||
* Created on: Jun 9, 2021
|
||||
* Author: user
|
||||
*/
|
||||
|
||||
#ifndef INC_CRC8_H_
|
||||
#define INC_CRC8_H_
|
||||
|
||||
#include "stdint.h"
|
||||
|
||||
/*
|
||||
* Definitions & macros
|
||||
*/
|
||||
|
||||
#define CRC8_POLYNOMIAL ((uint8_t)0x31)
|
||||
#define CRC8_INIT ((uint8_t)0xFF)
|
||||
|
||||
uint8_t crc8_calculate(const uint8_t *data, uint16_t count);
|
||||
|
||||
#endif /* INC_CRC8_H_ */
|
||||
Reference in New Issue
Block a user