#ifndef __CRC_H
#define __CRC_H
-#include <stdint.h> //uint32+
-#include <stdbool.h> //bool
-#include <stddef.h>
+#include "common.h" //stdint, stddef, stdbool
#include "util.h" // reflect, bswap_16
typedef struct crc {
* data_width lower-most bits are used).
*/
extern void crc_update(crc_t *crc, uint32_t data, int data_width);
+extern void crc_update2(crc_t *crc, uint32_t data, int data_width);
/* Clean the crc state, e.g. reset it to initial_value */
extern void crc_clear(crc_t *crc);
// test crc 16.
uint32_t CRC16_DNP(uint8_t *buff, size_t size);
uint32_t CRC16_CCITT(uint8_t *buff, size_t size);
+uint32_t CRC16_Iso15693(uint8_t *buff, size_t size);
+uint32_t CRC16_ICLASS(uint8_t *buff, size_t size);
/* Static initialization of a crc structure */
#define CRC_INITIALIZER(_order, _polynom, _initial_value, _final_xor) { \