libnfc  1.4.2
pn53x_usb.h
Go to the documentation of this file.
1 
24 #include <usb.h>
25 
26 typedef struct {
27  uint16_t idVendor;
28  uint16_t idProduct;
29 } usb_candidate_t;
30 
31 typedef struct {
32  usb_dev_handle *pudh;
33  usb_candidate_t uc;
34  uint32_t uiEndPointIn;
35  uint32_t uiEndPointOut;
36  uint32_t wMaxPacketSize;
37 } usb_spec_t;
38 
39 void get_end_points (struct usb_device *dev, usb_spec_t * pus);
40 
41 bool pn53x_usb_list_devices (nfc_device_desc_t pnddDevices[], size_t szDevices, size_t * pszDeviceFound,
42  usb_candidate_t candidates[], int num_candidates, char *target_name);
43 nfc_device_t *pn53x_usb_connect (const nfc_device_desc_t * pndd, const char *target_name, int target_chip);
44 bool pn53x_usb_transceive (nfc_device_t * pnd, const byte_t * pbtTx, const size_t szTx, byte_t * pbtRx,
45  size_t * pszRx);
46 void pn53x_usb_disconnect (nfc_device_t * pnd);