Moved crc calculation into its own class, renamed function to show which
crc is calculated.
This commit is contained in:
16
globalfunctions/CRC.h
Normal file
16
globalfunctions/CRC.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef CRC_CCITT_H_
|
||||
#define CRC_CCITT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
class CRC {
|
||||
public:
|
||||
static uint16_t crc16ccitt(uint8_t const input[], uint32_t length,
|
||||
uint16_t startingCrc = 0xffff);
|
||||
private:
|
||||
CRC();
|
||||
|
||||
static const uint16_t crc16ccitt_table[256];
|
||||
};
|
||||
|
||||
#endif /* CRC_H_ */
|
Reference in New Issue
Block a user