diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2018-10-08 17:41:06 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2018-12-11 13:29:21 +0000 |
commit | ff5d13a5f8940d8d6e9d097dc10af0dcf6d82f34 (patch) | |
tree | d9a46e571d9a259899809cabd5fd6c5a1784471c /src | |
parent | 077d45415796037838406f5c9293e1562413c17e (diff) | |
download | riscv-openocd-ff5d13a5f8940d8d6e9d097dc10af0dcf6d82f34.zip riscv-openocd-ff5d13a5f8940d8d6e9d097dc10af0dcf6d82f34.tar.gz riscv-openocd-ff5d13a5f8940d8d6e9d097dc10af0dcf6d82f34.tar.bz2 |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/aice/aice_usb.c | 5 | ||||
-rw-r--r-- | src/jtag/drivers/libusb0_common.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/jtag/aice/aice_usb.c b/src/jtag/aice/aice_usb.c index d77b26b..f67ea7c 100644 --- a/src/jtag/aice/aice_usb.c +++ b/src/jtag/aice/aice_usb.c @@ -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; diff --git a/src/jtag/drivers/libusb0_common.h b/src/jtag/drivers/libusb0_common.h index baa9e3c..676f43a 100644 --- a/src/jtag/drivers/libusb0_common.h +++ b/src/jtag/drivers/libusb0_common.h @@ -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) |