examples, test and utils use now nfc_init() function.

This commit is contained in:
Audrey Diacre 2012-01-18 11:09:01 +00:00
parent d1b0e93e8e
commit 1d55b6f8c6
26 changed files with 51 additions and 7 deletions

View file

@ -345,6 +345,8 @@ main (int argc, char *argv[])
err (EXIT_FAILURE, "Can't load NDEF file '%s'", argv[1]);
}
}
nfc_init ();
// Try to open the NFC reader
pnd = nfc_open (NULL);

View file

@ -75,6 +75,8 @@ main (int argc, const char *argv[])
bool verbose = false;
int res = 0;
nfc_init ();
// Display libnfc version
acLibnfcVersion = nfc_version ();
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);

View file

@ -537,6 +537,8 @@ main (int argc, const char *argv[])
}
// printf("Successfully opened required files\n");
nfc_init ();
// Try to open the NFC reader
pnd = nfc_open (NULL);
if (pnd == NULL) {

View file

@ -177,6 +177,8 @@ main (int argc, char *argv[])
}
}
nfc_init ();
// Try to open the NFC reader
pnd = nfc_open (NULL);

View file

@ -204,6 +204,8 @@ main (int argc, const char *argv[])
}
DBG ("Successfully opened the dump file\n");
nfc_init ();
// Try to open the NFC device
pnd = nfc_open (NULL);
if (pnd == NULL) {

View file

@ -194,6 +194,8 @@ main(int argc, char *argv[])
exit (EXIT_FAILURE);
}
}
nfc_init ();
pnd = nfc_open (NULL);

View file

@ -190,6 +190,8 @@ main (int argc, char *argv[])
signal (SIGINT, (void (*)()) intr_hdlr);
#endif
nfc_init ();
nfc_connstring connstrings[MAX_DEVICE_COUNT];
// List available devices
size_t szFound = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);