From 7cc4b4e9a48be1e05cf705185e95f74c6bbbdf96 Mon Sep 17 00:00:00 2001 From: gdsports Date: Fri, 3 Aug 2018 22:44:11 -1000 Subject: [PATCH 1/2] Fix USB Host failures #342 --- libraries/USBHost/src/hid.cpp | 2 +- libraries/USBHost/src/hidboot.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/USBHost/src/hid.cpp b/libraries/USBHost/src/hid.cpp index b53d52182..40b08dd7e 100644 --- a/libraries/USBHost/src/hid.cpp +++ b/libraries/USBHost/src/hid.cpp @@ -32,7 +32,7 @@ uint32_t HID::GetReportDescr(uint32_t ep, USBReadParser *parser) { } */ uint32_t HID::GetReportDescr(uint32_t wIndex, USBReadParser *parser) { - const uint8_t constBufLen = 64; + const uint8_t constBufLen = 128; uint8_t buf[constBufLen]; uint8_t rcode = pUsb->ctrlReq(bAddress, 0x00, bmREQ_HIDREPORT, USB_REQUEST_GET_DESCRIPTOR, 0x00, diff --git a/libraries/USBHost/src/hidboot.h b/libraries/USBHost/src/hidboot.h index 8fcb190d2..b99e0e7fb 100644 --- a/libraries/USBHost/src/hidboot.h +++ b/libraries/USBHost/src/hidboot.h @@ -312,8 +312,8 @@ uint32_t HIDBoot::Init(uint32_t parent, uint32_t port, uint32_t l // Reset - UHD_BusReset(); - while( Is_uhd_starting_reset() ) {} + //UHD_BusReset(); + //while( Is_uhd_starting_reset() ) {} // Restore p->epinfo p->epinfo = oldep_ptr; From f973f501d9fa7e81be0b4b92b3e4af9942b200a8 Mon Sep 17 00:00:00 2001 From: gdsports Date: Mon, 20 Aug 2018 16:31:44 -1000 Subject: [PATCH 2/2] Remove rather than comment out code --- libraries/USBHost/src/hidboot.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libraries/USBHost/src/hidboot.h b/libraries/USBHost/src/hidboot.h index b99e0e7fb..50461296d 100644 --- a/libraries/USBHost/src/hidboot.h +++ b/libraries/USBHost/src/hidboot.h @@ -311,10 +311,6 @@ uint32_t HIDBoot::Init(uint32_t parent, uint32_t port, uint32_t l } - // Reset - //UHD_BusReset(); - //while( Is_uhd_starting_reset() ) {} - // Restore p->epinfo p->epinfo = oldep_ptr;