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 /*
00030  * FIXME: There is no place for this here
00031  */
00032 #ifdef _WIN32
00033   /* Windows platform */
00034   #ifndef _WINDLL
00035     /* CMake compilation */
00036     #ifdef nfc_EXPORTS
00037       #define  NFC_EXPORT __declspec(dllexport)
00038     #else /* nfc_EXPORTS */
00039       #define  NFC_EXPORT __declspec(dllimport)
00040     #endif /* nfc_EXPORTS */
00041   #else /* _WINDLL */
00042     /* Manual makefile */
00043     #define NFC_EXPORT
00044   #endif /* _WINDLL */
00045 #else /* _WIN32 */
00046   #define NFC_EXPORT
00047 #endif /* _WIN32 */
00048 
00049 #include <nfc/nfc-types.h>
00050 
00051 byte_t oddparity(const byte_t bt);
00052 void oddparity_byte_ts(const byte_t* pbtData, const size_t szLen, byte_t* pbtPar);
00053 
00054 NFC_EXPORT byte_t mirror(byte_t bt);
00055 NFC_EXPORT uint32_t mirror32(uint32_t ui32Bits);
00056 NFC_EXPORT uint64_t mirror64(uint64_t ui64Bits);
00057 NFC_EXPORT void mirror_byte_ts(byte_t *pbts, size_t szLen);
00058 
00059 NFC_EXPORT uint32_t swap_endian32(const void* pui32);
00060 NFC_EXPORT uint64_t swap_endian64(const void* pui64);
00061 
00062 NFC_EXPORT void append_iso14443a_crc(byte_t* pbtData, size_t szLen);
00063 
00064 NFC_EXPORT void print_hex(const byte_t* pbtData, const size_t szLen);
00065 NFC_EXPORT void print_hex_bits(const byte_t* pbtData, const size_t szBits);
00066 NFC_EXPORT void print_hex_par(const byte_t* pbtData, const size_t szBits, const byte_t* pbtDataPar);
00067 
00068 #endif // _LIBNFC_BITUTILS_H_
00069 

Generated on 8 May 2010 for libnfc by  doxygen 1.6.1