summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-10-01 13:23:31 +0700
committerhathach <[email protected]>2013-10-01 13:23:31 +0700
commit7f4a3fc8294e733a9ba52d20fa16ca6662721126 (patch)
treea358ab772ace8e4265b298d1017155a6c06d5b7b
parent71b2859fe5236744e94b6cc1e05ebe24613ac224 (diff)
ignore multiple level of hub
-rw-r--r--readme.md3
-rw-r--r--tinyusb/host/usbh.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/readme.md b/readme.md
index 3b6a86bd9..ae7d8808c 100644
--- a/readme.md
+++ b/readme.md
@@ -16,7 +16,8 @@ designed to be simple and run out-of-the-box provided the configuration is corre
- HID Keyboard
- Communication Class (CDC)
- Mass-Storage (MSC)
-- Hub coming soon...
+- Hub
+ - Only support 1 level of hub (due to my laziness)
- Multiple host controllers
### Device ###
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index 3cc198788..929c87b0e 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -523,8 +523,9 @@ tusb_error_t enumeration_body_subtask(void)
class_index = std_class_code_to_index( ((tusb_descriptor_interface_t*) p_desc)->bInterfaceClass );
SUBTASK_ASSERT( class_index != 0 ); // class_index == 0 means corrupted data, abort enumeration
- if (usbh_class_drivers[class_index].open_subtask) // supported class
- {
+ if (usbh_class_drivers[class_index].open_subtask &&
+ !(class_index == TUSB_CLASS_HUB && usbh_devices[new_addr].hub_addr != 0))
+ { // supported class, TODO Hub disable multiple level
static uint16_t length;
length = 0;