static assert to check OSAL_QUEUE_DEF's queue_depth parameter < 256
enable HOST_HCD_XFER_INTERRUPT by default (previously only enabled with HID), as it is widely used implement tusbh_cdc_is_busy add compilation switch in usbh enumeration for hub rewrite CDC serial application to address usb-serial race condition
This commit is contained in:
@@ -392,6 +392,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
SUBTASK_EXIT(TUSB_ERROR_NONE); // restart task
|
||||
}
|
||||
}
|
||||
#if TUSB_CFG_HOST_HUB
|
||||
else
|
||||
{ // connected/disconnected via hub
|
||||
//------------- Get Port Status -------------//
|
||||
@@ -428,6 +429,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT( hub_port_clear_feature_subtask(usbh_devices[0].hub_addr, usbh_devices[0].hub_port, HUB_FEATURE_PORT_RESET_CHANGE), error );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
SUBTASK_ASSERT_STATUS( usbh_pipe_control_open(0, 8) );
|
||||
usbh_devices[0].state = TUSB_DEVICE_STATE_ADDRESSED;
|
||||
@@ -446,7 +448,9 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
SUBTASK_ASSERT_STATUS(error); // TODO some slow device is observed to fail the very fist controller xfer, can try more times
|
||||
hcd_port_reset( usbh_devices[0].core_id ); // reset port after 8 byte descriptor
|
||||
// osal_task_delay(50); // TODO reset is recommended to last 50 ms (NXP EHCI passes this)
|
||||
}else
|
||||
}
|
||||
#if TUSB_CFG_HOST_HUB
|
||||
else
|
||||
{ // connected via a hub
|
||||
SUBTASK_ASSERT_STATUS_WITH_HANDLER(error, hub_status_pipe_queue( usbh_devices[0].hub_addr) ); // TODO hub refractor
|
||||
OSAL_SUBTASK_INVOKED_AND_WAIT ( hub_port_reset_subtask(usbh_devices[0].hub_addr, usbh_devices[0].hub_port), error );
|
||||
@@ -458,6 +462,7 @@ tusb_error_t enumeration_body_subtask(void)
|
||||
|
||||
(void) hub_status_pipe_queue( usbh_devices[0].hub_addr ); // done with hub, waiting for next data on status pipe
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------- Set new address -------------//
|
||||
new_addr = get_new_address();
|
||||
|
||||
Reference in New Issue
Block a user