chg: most of the crc16 works.
ISO14443 crc A = crc16_a ISO14443 crc B = ... ISO15693 crc = crc16_x25
This commit is contained in:
@@ -11,8 +11,26 @@
|
||||
#include <stdint.h>
|
||||
#include "util.h" // SwapBits
|
||||
|
||||
unsigned short update_crc16(unsigned short crc, unsigned char c);
|
||||
uint16_t crc16(uint8_t const *message, int length, uint16_t remainder, uint16_t polynomial);
|
||||
#define CRC16_POLY_CCITT 0x1021
|
||||
#define CRC16_POLY 0x8408
|
||||
|
||||
|
||||
uint16_t update_crc16_ex( uint16_t crc, uint8_t c, uint16_t polynomial );
|
||||
uint16_t update_crc16(uint16_t crc, uint8_t c);
|
||||
uint16_t crc16(uint8_t const *message, int length, uint16_t remainder, uint16_t polynomial, bool refin, bool refout);
|
||||
uint16_t crc16_ccitt(uint8_t const *message, int length);
|
||||
|
||||
uint16_t crc16_ccitt_kermit(uint8_t const *message, int length);
|
||||
uint16_t crc16_kermit(uint8_t const *message, int length);
|
||||
uint16_t crc16_xmodem(uint8_t const *d, int n);
|
||||
|
||||
uint16_t crc16_x25(uint8_t const *d, int n);
|
||||
uint16_t crc16_a(uint8_t const *d, int n);
|
||||
|
||||
bool check_crc16_ccitt(uint8_t const *d, int n);
|
||||
|
||||
//felica imp
|
||||
void felica_test();
|
||||
void init_crcccitt_tab( void );
|
||||
uint16_t update_crc_ccitt( uint16_t crc,uint8_t c );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user