mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-20 13:36:19 +00:00
Examples and utils are now updated to use the requiered nfc_context
This commit is contained in:
@@ -177,10 +177,11 @@ main(int argc, 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) {
|
||||
printf("Error opening NFC reader\n");
|
||||
@@ -215,7 +216,7 @@ main(int argc, char *argv[])
|
||||
if (!transmit_bits(abtReqa, 7)) {
|
||||
printf("Error: No tag available\n");
|
||||
nfc_close(pnd);
|
||||
nfc_exit(NULL);
|
||||
nfc_exit(context);
|
||||
return 1;
|
||||
}
|
||||
memcpy(abtAtqa, abtRx, 2);
|
||||
@@ -354,6 +355,6 @@ main(int argc, char *argv[])
|
||||
|
||||
|
||||
nfc_close(pnd);
|
||||
nfc_exit(NULL);
|
||||
return 0;
|
||||
nfc_exit(context);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user