libusb0: add compatibility define for transfer type bulk
For compatibility with libusb1, define LIBUSB_TRANSFER_TYPE_BULK in libusb0. Remove the #ifdef HAVE_LIBUSB1 in jtag/driver/aice This also fixes a compile error in jtag/drivers/openjtag with libusb0. Change-Id: I827b77eac10216759eb31aab461b2b63cabaf195 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/4700 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
parent
077d454157
commit
ff5d13a5f8
|
@ -2139,11 +2139,8 @@ static int aice_usb_open(struct aice_port_param_s *param)
|
|||
|
||||
unsigned int aice_read_ep;
|
||||
unsigned int aice_write_ep;
|
||||
#ifdef HAVE_LIBUSB1
|
||||
|
||||
jtag_libusb_choose_interface(devh, &aice_read_ep, &aice_write_ep, -1, -1, -1, LIBUSB_TRANSFER_TYPE_BULK);
|
||||
#else
|
||||
jtag_libusb_choose_interface(devh, &aice_read_ep, &aice_write_ep, -1, -1, -1, USB_ENDPOINT_TYPE_BULK);
|
||||
#endif
|
||||
LOG_DEBUG("aice_read_ep=0x%x, aice_write_ep=0x%x", aice_read_ep, aice_write_ep);
|
||||
|
||||
aice_handler.usb_read_ep = aice_read_ep;
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#define LIBUSB_RECIPIENT_DEVICE USB_RECIP_DEVICE
|
||||
#define LIBUSB_ENDPOINT_OUT USB_ENDPOINT_OUT
|
||||
#define LIBUSB_ENDPOINT_IN USB_ENDPOINT_IN
|
||||
#define LIBUSB_TRANSFER_TYPE_BULK USB_ENDPOINT_TYPE_BULK
|
||||
|
||||
static inline int jtag_libusb_claim_interface(jtag_libusb_device_handle *devh,
|
||||
int iface)
|
||||
|
|
Loading…
Reference in New Issue