CHG: refactor CRC16 algos. This is a big change, most likely some parts broke, hard to test it all.

This commit is contained in:
iceman1001 2018-02-01 15:19:47 +01:00
commit 52d69ed4ee
35 changed files with 512 additions and 674 deletions

View file

@ -8,6 +8,7 @@
#include "iso14443crc.h"
uint16_t UpdateCrc14443(uint8_t b, uint16_t *crc) {
b = (b ^ (uint8_t)((*crc) & 0x00FF));
b = (b ^ (b << 4));
@ -41,4 +42,4 @@ bool CheckCrc14443(uint16_t CrcType, const uint8_t *data, int length) {
if ((b1 == data[length - 2]) && (b2 == data[length - 1]))
return true;
return false;
}
}