diff --git a/examples/nfc-utils.c b/examples/nfc-utils.c index 2626760..33063c8 100644 --- a/examples/nfc-utils.c +++ b/examples/nfc-utils.c @@ -21,6 +21,21 @@ static const byte_t OddParity[256] = { 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1 }; +byte_t oddparity(const byte_t bt) +{ + return OddParity[bt]; +} + +void oddparity_bytes_ts(const byte_t* pbtData, const size_t szLen, byte_t* pbtPar) +{ + size_t szByteNr; + // Calculate the parity bits for the command + for (szByteNr=0; szByteNr #include +byte_t oddparity(const byte_t bt); +void oddparity_byte_ts(const byte_t* pbtData, const size_t szLen, byte_t* pbtPar); void print_hex(const byte_t* pbtData, const size_t szLen); void print_hex_bits(const byte_t* pbtData, const size_t szBits);