Merge the libnfc-less-bitutils-more-ponies branch into trunk.

This commit is contained in:
Romain Tartiere 2010-04-26 13:13:13 +00:00
commit b28abd77b0
23 changed files with 330 additions and 65 deletions

View file

@ -36,7 +36,7 @@
#include <nfc/nfc.h>
#include <nfc/nfc-messages.h>
#include "bitutils.h"
#include "nfc-utils.h"
#define SAK_FLAG_ATS_SUPPORTED 0x20
@ -198,12 +198,10 @@ int main(int argc,char* argv[])
transmit_bytes(abtHalt,4);
printf("\nFound tag with UID: ");
if (szUidLen == 4)
{
printf("%08x\n",swap_endian32(abtUid));
} else {
printf("%014llx\n",swap_endian64(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;