From bc7894b99dc4902b365b5f2e5bb258f471fe5582 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Sun, 21 Feb 2016 20:52:21 +0100 Subject: all: Fix usb endpoints after conversion to libusb 1.0 Endpoint in nolo.c for libusb_bulk_transfer must be 0x02, not 0x01. --- src/nolo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nolo.c') diff --git a/src/nolo.c b/src/nolo.c index 91bcf3f..4f5ec27 100644 --- a/src/nolo.c +++ b/src/nolo.c @@ -29,9 +29,6 @@ #include "global.h" #include "printf-utils.h" -#define READ_DEV 0x81 -#define WRITE_DEV 0x01 - /* Request type */ #define NOLO_WRITE 64 #define NOLO_QUERY 192 @@ -393,7 +390,7 @@ static int nolo_send_image(struct usb_device_info * dev, struct image * image, i if ( ret == 0 ) break; if ( ! simulate ) { - if ( libusb_bulk_transfer(dev->udev, WRITE_DEV, (unsigned char*)buf, ret, &transferred, 5000) < 0 ) { + if ( libusb_bulk_transfer(dev->udev, USB_WRITE_DATA_EP, (unsigned char*)buf, ret, &transferred, 5000) < 0 ) { PRINTF_END(); NOLO_ERROR_RETURN("Sending image failed", -1); } -- cgit v1.2.3