bitutils.h

Go to the documentation of this file.
00001 
00024 #ifndef _LIBNFC_BITUTILS_H_
00025 #define _LIBNFC_BITUTILS_H_
00026 
00027 #include <stdint.h>
00028 
00029 #include <nfc/nfc-types.h>
00030 
00031 byte_t oddparity(const byte_t bt);
00032 void oddparity_byte_ts(const byte_t* pbtData, const size_t szLen, byte_t* pbtPar);
00033 
00034 byte_t mirror(byte_t bt);
00035 uint32_t mirror32(uint32_t ui32Bits);
00036 uint64_t mirror64(uint64_t ui64Bits);
00037 void mirror_byte_ts(byte_t *pbts, size_t szLen);
00038 
00039 uint32_t swap_endian32(const void* pui32);
00040 uint64_t swap_endian64(const void* pui64);
00041 
00042 void append_iso14443a_crc(byte_t* pbtData, size_t szLen);
00043 
00044 void print_hex(const byte_t* pbtData, const size_t szLen);
00045 void print_hex_bits(const byte_t* pbtData, const size_t szBits);
00046 void print_hex_par(const byte_t* pbtData, const size_t szBits, const byte_t* pbtDataPar);
00047 
00048 #endif // _LIBNFC_BITUTILS_H_
00049