summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-10-02 11:01:28 +0700
committerhathach <[email protected]>2013-10-02 11:01:28 +0700
commit5c8389b9ae88d04b7d45330ad8b79ce0352b547b (patch)
tree94276b23b23d3c314824cf5eaec4f6174bf2bd6c /tinyusb
parentef83b8e10a1afd85fd935d5656f363927f3cd4bb (diff)
update freertos project
temp hack to fix problem with no TD on status endpoint of hub in case of error
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/host/usbh.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index dcb4e73a8..f36c279a4 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -391,7 +391,8 @@ tusb_error_t enumeration_body_subtask(void)
4, enum_data_buffer ),
error
);
- SUBTASK_ASSERT_STATUS( error );
+// SUBTASK_ASSERT_STATUS( error );
+ SUBTASK_ASSERT_STATUS_WITH_HANDLER(error, hub_status_pipe_queue( usbh_devices[0].hub_addr) ); // TODO hub refractor
// Acknowledge Port Connection Change
OSAL_SUBTASK_INVOKED_AND_WAIT( hub_port_clear_feature_subtask(usbh_devices[0].hub_addr, usbh_devices[0].hub_port, HUB_FEATURE_PORT_CONNECTION_CHANGE), error );
@@ -408,7 +409,8 @@ tusb_error_t enumeration_body_subtask(void)
else
{ // Connection Event
OSAL_SUBTASK_INVOKED_AND_WAIT ( hub_port_reset_subtask(usbh_devices[0].hub_addr, usbh_devices[0].hub_port), error );
- SUBTASK_ASSERT_STATUS( error );
+// SUBTASK_ASSERT_STATUS( error );
+ SUBTASK_ASSERT_STATUS_WITH_HANDLER(error, hub_status_pipe_queue( usbh_devices[0].hub_addr) ); // TODO hub refractor
usbh_devices[0].speed = hub_port_get_speed();
@@ -427,15 +429,16 @@ tusb_error_t enumeration_body_subtask(void)
8, enum_data_buffer ),
error
);
- SUBTASK_ASSERT_STATUS(error); // TODO some slow device is observed to fail the very fist controller xfer, can try more times
//------------- Reset device again before Set Address -------------//
if (usbh_devices[0].hub_addr == 0)
{ // connected directly to roothub
+ 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
{ // 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 );
if ( TUSB_ERROR_NONE == error )