Added TARGET_DISCO_F469NI in USBHOST\USBHost\TARGET_STM\USBHALHost_STM_TARGET.h
Dependents: DISCO-F469NI_USB_Disk STM32F4xx_USB_Memory
Fork of USBHOST by
Diff: USBHostHub/USBHostHub.cpp
- Revision:
- 5:fc157e6bd5a5
- Parent:
- 1:ab240722d7ef
- Child:
- 8:3e7a33f81048
--- a/USBHostHub/USBHostHub.cpp Fri Feb 17 12:40:57 2017 +0100 +++ b/USBHostHub/USBHostHub.cpp Wed Apr 26 18:11:37 2017 +0200 @@ -180,7 +180,7 @@ void USBHostHub::rxHandler() { uint32_t status; if (int_in) { - if (int_in->getState() == USB_TYPE_IDLE) { + if ((int_in->getLengthTransferred())&&(int_in->getState() == USB_TYPE_IDLE)) { for (int port = 1; port <= nb_port; port++) { status = getPortStatus(port); USB_DBG("[hub handler hub: %d] status port %d [hub: %p]: 0x%X", dev->getHub(), port, dev, status); @@ -227,6 +227,9 @@ #endif while(1) { status = getPortStatus(port); + /* disconnection since reset request */ + if (!(status & PORT_CONNECTION)) + break; if (status & (PORT_ENABLE | PORT_RESET)) break; if (status & PORT_OVER_CURRENT) {