summaryrefslogtreecommitdiff
path: root/tinyusb
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb')
-rw-r--r--tinyusb/host/ehci/ehci.c19
-rw-r--r--tinyusb/host/usbh.c3
-rw-r--r--tinyusb/osal/osal_common.h4
3 files changed, 5 insertions, 21 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c
index 8e7086d23..b698fa229 100644
--- a/tinyusb/host/ehci/ehci.c
+++ b/tinyusb/host/ehci/ehci.c
@@ -414,6 +414,8 @@ void async_advance_isr(ehci_qhd_t * const async_head)
async_head->is_removing = 0;
async_head->p_qtd_list_head = async_head->p_qtd_list_tail = NULL;
async_head->qtd_overlay.halted = 1;
+
+ usbh_devices[0].state = TUSB_DEVICE_STATE_UNPLUG;
}
for(uint8_t relative_dev_addr=0; relative_dev_addr < TUSB_CFG_HOST_DEVICE_MAX; relative_dev_addr++)
@@ -439,23 +441,6 @@ void async_advance_isr(ehci_qhd_t * const async_head)
}
// TODO free all itd & sitd
}
-
-// // check if any other endpoints in pool is removing
-// for (uint8_t i=0; i<EHCI_MAX_QHD; i++)
-// {
-// ehci_qhd_t *p_qhd = &ehci_data.device[relative_dev_addr].qhd[i];
-// if (p_qhd->is_removing)
-// {
-// p_qhd->used = 0;
-// p_qhd->is_removing = 0;
-//
-// while(p_qhd->p_qtd_list_head != NULL) // remove all TDs
-// {
-// p_qhd->p_qtd_list_head->used = 0; // free QTD
-// qtd_remove_1st_from_qhd(p_qhd);
-// }
-// }
-// }// end qhd list loop
} // end for device[] loop
}
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index 3cf80f6c5..eada2d6cb 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -314,10 +314,9 @@ OSAL_TASK_DECLARE(usbh_enumeration_task)
usbh_devices[new_addr].hub_addr = usbh_devices[0].hub_addr;
usbh_devices[new_addr].hub_port = usbh_devices[0].hub_port;
usbh_devices[new_addr].speed = usbh_devices[0].speed;
- usbh_devices[new_addr].state = TUSB_DEVICE_STATE_ADDRESSED;
+ usbh_devices[new_addr].state = TUSB_DEVICE_STATE_ADDRESSED;
usbh_pipe_control_close(0);
- usbh_devices[0].state = TUSB_DEVICE_STATE_UNPLUG;
// open control pipe for new address
TASK_ASSERT_STATUS ( usbh_pipe_control_open(new_addr, ((tusb_descriptor_device_t*) enum_data_buffer)->bMaxPacketSize0 ) );
diff --git a/tinyusb/osal/osal_common.h b/tinyusb/osal/osal_common.h
index ceb6d00fd..eda859145 100644
--- a/tinyusb/osal/osal_common.h
+++ b/tinyusb/osal/osal_common.h
@@ -59,8 +59,8 @@
enum
{
- OSAL_TIMEOUT_NOTIMEOUT = 0, // for use within ISR, return immediately
- OSAL_TIMEOUT_NORMAL = 10, // default is 10 msec
+ OSAL_TIMEOUT_NOTIMEOUT = 0, // for use within ISR, return immediately
+ OSAL_TIMEOUT_NORMAL = 10, // default is 10 msec
OSAL_TIMEOUT_WAIT_FOREVER = 0x0EEEEEEE
};