hcd/ehci: hcd_edpt_open() return false if ep is already opened. implement hcd_edpt_close()

This commit is contained in:
hathach
2025-03-26 21:13:01 +07:00
parent 1615120bca
commit 901ce2ad93
6 changed files with 284 additions and 273 deletions

View File

@@ -520,7 +520,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr) {
// Loop until there is no more events in the queue
while (1) {
hcd_event_t event;
if (!osal_queue_receive(_usbh_q, &event, timeout_ms)) return;
if (!osal_queue_receive(_usbh_q, &event, timeout_ms)) { return; }
switch (event.event_id) {
case HCD_EVENT_DEVICE_ATTACH: