fix REV macros & hitagS

This commit is contained in:
Philippe Teuwen 2020-05-14 17:52:00 +02:00
parent bddd2a9fc1
commit 3c44ef39f7
2 changed files with 4 additions and 4 deletions

View file

@ -454,7 +454,7 @@ static void hitagS_handle_reader_command(uint8_t *rx, const size_t rxlen,
//add crc8
*txlen = 40;
crc = CRC_PRESET;
calc_crc(&crc, tag.pages[1][2]), 8);
calc_crc(&crc, tag.pages[1][2], 8);
calc_crc(&crc, tag.pwdh0, 8);
calc_crc(&crc, tag.pwdl0, 8);
calc_crc(&crc, tag.pwdl1, 8);

View file

@ -55,15 +55,15 @@
#endif
#ifndef REV16
#define REV16(x) (REV8(x) + (REV8 (x >> 8) << 8))
#define REV16(x) (REV8(x) + (REV8 ((x) >> 8) << 8))
#endif
#ifndef REV32
#define REV32(x) (REV16(x) + (REV16(x >> 16) << 16))
#define REV32(x) (REV16(x) + (REV16((x) >> 16) << 16))
#endif
#ifndef REV64
#define REV64(x) (REV32(x) + (REV32(x >> 32) << 32))
#define REV64(x) (REV32(x) + (REV32((x) >> 32) << 32))
#endif
#ifndef BIT32