mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-07-23 20:21:51 +00:00
(libnfc-less-bitutils-more-ponies) Fix build on windows:
- do not depends on byte swapping functions / macros; - add basic err.h functionalities.
This commit is contained in:
@@ -33,8 +33,6 @@
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/endian.h>
|
||||
|
||||
#include <nfc/nfc.h>
|
||||
|
||||
#include <nfc/nfc-messages.h>
|
||||
@@ -200,12 +198,10 @@ int main(int argc,char* argv[])
|
||||
transmit_bytes(abtHalt,4);
|
||||
|
||||
printf("\nFound tag with UID: ");
|
||||
if (szUidLen == 4)
|
||||
{
|
||||
printf("%08x\n", bswap32( *((uint32_t *)&abtUid)));
|
||||
} else {
|
||||
printf("%014llx\n",bswap64(*((uint64_t *) &abtUid))&0x00ffffffffffffffull);
|
||||
if (szUidLen == 7) {
|
||||
printf("%02x%02x%02x", abtUid[6], abtUid[5], abtUid[4]);
|
||||
}
|
||||
printf("%02x%02x%02x%02x\n", abtUid[3], abtUid[2], abtUid[1], abtUid[0]);
|
||||
|
||||
nfc_disconnect(pnd);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user