2020-04-06 13:22:42 +02:00
|
|
|
#ifndef CRC_CCITT_H_
|
|
|
|
#define CRC_CCITT_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
class CRC {
|
2022-02-02 10:29:30 +01:00
|
|
|
public:
|
|
|
|
static uint16_t crc16ccitt(uint8_t const input[], uint32_t length, uint16_t startingCrc = 0xffff);
|
2020-04-06 13:22:42 +02:00
|
|
|
|
2022-02-02 10:29:30 +01:00
|
|
|
private:
|
|
|
|
CRC();
|
|
|
|
|
|
|
|
static const uint16_t crc16ccitt_table[256];
|
2020-04-06 13:22:42 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* CRC_H_ */
|