summaryrefslogtreecommitdiffstats
path: root/src/nolo.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2016-02-21 20:52:21 +0100
committerPali Rohár <pali.rohar@gmail.com>2016-02-21 20:52:21 +0100
commitbc7894b99dc4902b365b5f2e5bb258f471fe5582 (patch)
tree461524cfd4c20119dfbc9e120313974ebc97249e /src/nolo.c
parentabcf2562689a46386b45eaa34da44010054244ae (diff)
download0xFFFF-bc7894b99dc4902b365b5f2e5bb258f471fe5582.tar.bz2
all: Fix usb endpoints after conversion to libusb 1.0
Endpoint in nolo.c for libusb_bulk_transfer must be 0x02, not 0x01.
Diffstat (limited to 'src/nolo.c')
-rw-r--r--src/nolo.c5
1 files changed, 1 insertions, 4 deletions
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);
}