add nfc_device_get_connstring() function and nfc-probe example to show devices connection strings

This commit is contained in:
Romuald Conty
2012-01-18 13:17:01 +00:00
parent 39216f9d7c
commit b366b8c027
10 changed files with 159 additions and 19 deletions

View File

@@ -382,8 +382,8 @@ pn53x_usb_open (const nfc_connstring connstring)
}
data.model = pn53x_usb_get_device_model (dev->descriptor.idVendor, dev->descriptor.idProduct);
// Allocate memory for the device info and specification, fill it and return the info
pnd = nfc_device_new ();
pn53x_usb_get_usb_device_name (dev, data.pudh, pnd->acName, sizeof (pnd->acName));
pnd = nfc_device_new (connstring);
pn53x_usb_get_usb_device_name (dev, data.pudh, pnd->name, sizeof (pnd->name));
pnd->driver_data = malloc(sizeof(struct pn53x_usb_data));
*DRIVER_DATA (pnd) = data;