Smart merge of acr122_usb branch: add acr122_usb driver without removing acr122_pcsc support.
This commit is contained in:
commit
82b2cfa883
14 changed files with 813 additions and 88 deletions
|
|
@ -97,19 +97,23 @@ main (int argc, const char *argv[])
|
|||
nfc_connstring connstrings[MAX_DEVICE_COUNT];
|
||||
size_t szDeviceFound = nfc_list_devices (NULL, connstrings, MAX_DEVICE_COUNT);
|
||||
|
||||
int res = EXIT_FAILURE;
|
||||
if (szDeviceFound == 0) {
|
||||
printf ("No NFC device found.\n");
|
||||
goto bye;
|
||||
}
|
||||
|
||||
printf ("%d NFC device(s) found:\n", (int) szDeviceFound);
|
||||
printf ("%d NFC device(s) found:\n", (int)szDeviceFound);
|
||||
for (i = 0; i < szDeviceFound; i++) {
|
||||
pnd = nfc_open (NULL, connstrings[i]);
|
||||
if (pnd != NULL) {
|
||||
printf ("- %s:\n %s\n", nfc_device_get_name (pnd), nfc_device_get_connstring (pnd));
|
||||
nfc_close (pnd);
|
||||
}
|
||||
nfc_close (pnd);
|
||||
}
|
||||
|
||||
res = EXIT_SUCCESS;
|
||||
|
||||
bye:
|
||||
nfc_exit (NULL);
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue