Ease diff between both libusb based drivers: acr122_usb and pn53x_usb

This commit is contained in:
Romuald Conty 2013-03-02 10:59:37 +01:00
parent b2b1d2a2a2
commit 3aadb45988
2 changed files with 7 additions and 2 deletions

View file

@ -160,6 +160,7 @@ struct acr122_usb_apdu_frame {
};
#pragma pack()
// Internal data struct
struct acr122_usb_data {
usb_dev_handle *pudh;
acr122_usb_model model;
@ -191,7 +192,7 @@ const uint8_t acr122_usb_frame_template[] = {
// APDUs instructions
#define APDU_GetAdditionnalData 0xc0
// Internal data struct
// Internal io struct
const struct pn53x_io acr122_usb_io;
// Prototypes

View file

@ -65,7 +65,7 @@ typedef enum {
SONY_RCS360
} pn53x_usb_model;
// Internal data structs
// Internal data struct
struct pn53x_usb_data {
usb_dev_handle *pudh;
pn53x_usb_model model;
@ -75,6 +75,7 @@ struct pn53x_usb_data {
volatile bool abort_flag;
};
// Internal io struct
const struct pn53x_io pn53x_usb_io;
// Prototypes
@ -174,7 +175,9 @@ static size_t
pn53x_usb_scan(const nfc_context *context, nfc_connstring connstrings[], const size_t connstrings_len)
{
(void)context;
usb_prepare();
size_t device_found = 0;
uint32_t uiBusIndex = 0;
struct usb_bus *bus;
@ -736,6 +739,7 @@ const struct pn53x_io pn53x_usb_io = {
const struct nfc_driver pn53x_usb_driver = {
.name = PN53X_USB_DRIVER_NAME,
.scan_type = NOT_INTRUSIVE,
.scan = pn53x_usb_scan,
.open = pn53x_usb_open,
.close = pn53x_usb_close,