mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-07-25 13:11:49 +00:00
nfc_list_devices() function returns now the number of devices found.
This commit is contained in:
@@ -63,11 +63,10 @@ main (int argc, const char *argv[])
|
||||
{
|
||||
uint8_t abtRx[MAX_FRAME_LEN];
|
||||
int szRx;
|
||||
size_t szDeviceFound;
|
||||
uint8_t abtTx[] = "Hello Mars!";
|
||||
#define MAX_DEVICE_COUNT 2
|
||||
nfc_connstring connstrings[MAX_DEVICE_COUNT];
|
||||
nfc_list_devices (connstrings, MAX_DEVICE_COUNT, &szDeviceFound);
|
||||
size_t szDeviceFound = nfc_list_devices (connstrings, MAX_DEVICE_COUNT);
|
||||
// Little hack to allow using nfc-dep-initiator & nfc-dep-target from
|
||||
// the same machine: if there is more than one readers connected
|
||||
// nfc-dep-target will connect to the second reader
|
||||
|
||||
Reference in New Issue
Block a user