ignore multiple level of hub

This commit is contained in:
hathach 2013-10-01 13:23:31 +07:00
parent 71b2859fe5
commit 7f4a3fc829
2 changed files with 5 additions and 3 deletions

View File

@ -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 ###

View File

@ -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;