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
|
|
@ -537,10 +537,10 @@ main (int argc, const char *argv[])
|
|||
}
|
||||
// printf("Successfully opened required files\n");
|
||||
|
||||
nfc_init ();
|
||||
nfc_init (NULL);
|
||||
|
||||
// Try to open the NFC reader
|
||||
pnd = nfc_open (NULL);
|
||||
pnd = nfc_open (NULL, NULL);
|
||||
if (pnd == NULL) {
|
||||
printf ("Error opening NFC reader\n");
|
||||
exit (EXIT_FAILURE);
|
||||
|
|
@ -565,7 +565,7 @@ main (int argc, const char *argv[])
|
|||
if (nfc_initiator_select_passive_target (pnd, nmMifare, NULL, 0, &nt) < 0) {
|
||||
printf ("Error: no tag was found\n");
|
||||
nfc_close (pnd);
|
||||
nfc_exit ();
|
||||
nfc_exit (NULL);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
// Test if we are dealing with a MIFARE compatible tag
|
||||
|
|
@ -665,6 +665,6 @@ main (int argc, const char *argv[])
|
|||
}
|
||||
};
|
||||
|
||||
nfc_exit ();
|
||||
nfc_exit (NULL);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue