From: Andrew Andrianov Date: Mon, 5 Oct 2015 15:58:22 +0000 (+0300) Subject: Fix timeouts, add debug X-Git-Tag: v0.1~11 X-Git-Url: http://git.linex4red.de/pub/pl2303-ft232-gpio.git/commitdiff_plain/6e97682e7068ee535c0e713edd12adde92b6159f Fix timeouts, add debug Signed-off-by: Andrew Andrianov --- diff --git a/cp2103.c b/cp2103.c index 72ef5be..f158d9d 100644 --- a/cp2103.c +++ b/cp2103.c @@ -91,7 +91,7 @@ void gpio_write_reg(libusb_device_handle *h, uint16_t reg) reg, // wIndex 0, // pointer to destination buffer 0, // wLength - 6000 + 1000 ); handle_error(bytes); } diff --git a/pl2303.c b/pl2303.c index c6c4d69..fb17c19 100644 --- a/pl2303.c +++ b/pl2303.c @@ -50,7 +50,7 @@ char gpio_read_reg(libusb_device_handle *h) 0, // wIndex &buf, // pointer to destination buffer 1, // wLength - 100 + 1000 ); handle_error(bytes); return buf; @@ -66,7 +66,7 @@ void gpio_write_reg(libusb_device_handle *h, unsigned char reg) reg, // wIndex 0, // pointer to destination buffer 0, // wLength - 6000 + 1000 ); handle_error(bytes); diff --git a/usb.c b/usb.c index 64b2fe6..905df10 100644 --- a/usb.c +++ b/usb.c @@ -72,6 +72,7 @@ void check_handle(libusb_device_handle **h, int vid, int pid, const char* manuf, if (*h) return; libusb_init(NULL); + libusb_set_debug(NULL, LIBUSB_LOG_LEVEL_WARNING); *h = ncusb_find_and_open(NULL, vid, pid, manuf, product, serial); if (!(*h)) { fprintf(stderr, "No PL2303 USB device %04x:%04x found ;(\n", vid, pid);