Examples and utils are now updated to use the requiered nfc_context
This commit is contained in:
parent
dc949c257e
commit
5b0e276572
20 changed files with 136 additions and 103 deletions
|
|
@ -83,10 +83,11 @@ int main(int argc, const char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
nfc_init(NULL);
|
||||
nfc_context *context;
|
||||
nfc_init(&context);
|
||||
|
||||
// Try to open the NFC reader
|
||||
pnd = nfc_open(NULL, NULL);
|
||||
pnd = nfc_open(context, NULL);
|
||||
|
||||
if (pnd == NULL) {
|
||||
ERR("%s", "Unable to open NFC device.");
|
||||
|
|
@ -197,6 +198,6 @@ int main(int argc, const char *argv[])
|
|||
fclose(input);
|
||||
}
|
||||
nfc_close(pnd);
|
||||
nfc_exit(NULL);
|
||||
return 1;
|
||||
nfc_exit(context);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue