Source

CRC / crc.h

Full commit
#include <string.h>
#include <stdint.h>

#define CRC16_INIT      0xFFFF
#define CRC16_POLY      0x1021
#define CRC16_POLYREV   0x8408

extern void crc16_init(uint16_t* crc);
extern void crc16_finish(uint16_t* crc);
extern void crc16_update(uint16_t* crc, uint8_t* data, size_t length);
extern uint16_t crc16(uint8_t* data, size_t length);