31 #endif // HAVE_CONFIG_H
35 #include "../drivers.h"
39 pn533_usb_pick_device (
void)
43 if ((pndd = malloc (
sizeof (*pndd)))) {
46 if (!pn533_usb_list_devices (pndd, 1, &szN)) {
47 DBG (
"%s",
"pn533_usb_list_devices failed");
53 DBG (
"%s",
"No device found");
63 pn533_usb_list_devices (
nfc_device_desc_t pnddDevices[],
size_t szDevices,
size_t * pszDeviceFound)
66 usb_candidate_t candidates[] = {
72 return pn53x_usb_list_devices (&pnddDevices[0], szDevices, pszDeviceFound, &candidates[0],
73 sizeof (candidates) /
sizeof (usb_candidate_t), PN533_USB_DRIVER_NAME);
79 return pn53x_usb_connect (pndd, pndd->
acDevice, NC_PN533);
85 usb_spec_t* pus = (usb_spec_t*) pnd->
nds;
86 DBG (
"pus->uc.idVendor == 0x%04x, pus->uc.idProduct == 0x%04x", pus->uc.idVendor, pus->uc.idProduct);
87 if ((pus->uc.idVendor == 0x1FD3) && (pus->uc.idProduct == 0x0608)) {
88 DBG (
"ASK LoGO initialization.");
89 pn53x_set_reg (pnd, 0x6106, 0xFF, 0x1B);
90 pn53x_set_reg (pnd, 0x6306, 0xFF, 0x14);
91 pn53x_set_reg (pnd, 0xFFFD, 0xFF, 0x37);
92 pn53x_set_reg (pnd, 0xFFB0, 0xFF, 0x3B);