ST/USBHOST forked to add another HID handler for raw keyboard data to get more detail not available with current handlers (all pressed keys, all releases, and periodic updates)

Dependents:   C64-stm429_discovery

Revision:
5:fc157e6bd5a5
Parent:
1:ab240722d7ef
--- 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) {