From 9ecaec67b3a7ed9f6565840941c4b4cdb599fdba Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 30 Sep 2013 16:40:02 +0700 Subject: [PATCH] refractor hub --- tinyusb/host/hub.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tinyusb/host/hub.c b/tinyusb/host/hub.c index 672ac4c1..9235293c 100644 --- a/tinyusb/host/hub.c +++ b/tinyusb/host/hub.c @@ -158,12 +158,8 @@ tusb_error_t hub_enumerate_subtask(void) usbh_devices[0].speed = (p_port_status->status_current.high_speed_device_attached) ? TUSB_SPEED_HIGH : (p_port_status->status_current.low_speed_device_attached ) ? TUSB_SPEED_LOW : TUSB_SPEED_FULL; - OSAL_SUBTASK_INVOKED_AND_WAIT( - usbh_control_xfer_subtask( usbh_devices[0].hub_addr, bm_request_type(TUSB_DIR_HOST_TO_DEV, TUSB_REQUEST_TYPE_CLASS, TUSB_REQUEST_RECIPIENT_OTHER), - HUB_REQUEST_CLEAR_FEATURE, HUB_FEATURE_PORT_RESET_CHANGE, usbh_devices[0].hub_port, - 0, NULL ), - error - ); + // Acknowledge Port Reset Change + OSAL_SUBTASK_INVOKED_AND_WAIT( hub_port_clear_feature_subtask(HUB_FEATURE_PORT_RESET_CHANGE), error ); SUBTASK_ASSERT_STATUS( error ); OSAL_SUBTASK_END