add context to nfc_init(), nfc_exit(), nfc_open() and nfc_list_devices() functions.
This commit is contained in:
parent
86c8ce536b
commit
4c011279ff
29 changed files with 142 additions and 138 deletions
|
|
@ -14,14 +14,14 @@ main (int argc, const char *argv[])
|
|||
nfc_device *pnd;
|
||||
nfc_target nt;
|
||||
|
||||
nfc_init();
|
||||
nfc_init (NULL);
|
||||
|
||||
// Display libnfc version
|
||||
const char *acLibnfcVersion = nfc_version ();
|
||||
printf ("%s uses libnfc %s\n", argv[0], acLibnfcVersion);
|
||||
|
||||
// Open, using the first available NFC device
|
||||
pnd = nfc_open (NULL);
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
|
||||
if (pnd == NULL) {
|
||||
ERR ("%s", "Unable to open NFC device.");
|
||||
|
|
@ -55,6 +55,6 @@ main (int argc, const char *argv[])
|
|||
}
|
||||
// Close NFC device
|
||||
nfc_close (pnd);
|
||||
nfc_exit ();
|
||||
nfc_exit (NULL);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue