diff options
Diffstat (limited to 'tinyusb/host')
| -rw-r--r-- | tinyusb/host/ehci/ehci.c | 3 | ||||
| -rw-r--r-- | tinyusb/host/usbh.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tinyusb/host/ehci/ehci.c b/tinyusb/host/ehci/ehci.c index 43dae3235..21c457c17 100644 --- a/tinyusb/host/ehci/ehci.c +++ b/tinyusb/host/ehci/ehci.c @@ -533,11 +533,12 @@ void async_list_process_isr(ehci_qhd_t * const async_head) void period_list_process_isr(uint8_t hostid, uint8_t interval_ms) { uint8_t max_loop = 0; + uint32_t const period_1ms_addr = (uint32_t) get_period_head(hostid, 1); ehci_link_t next_item = * get_period_head(hostid, interval_ms); // TODO abstract max loop guard for period while( !next_item.terminate && - !(interval_ms > 1 && align32(next_item.address) == (uint32_t) get_period_head(hostid, 1)) && + !(interval_ms > 1 && period_1ms_addr == align32(next_item.address)) && max_loop < (EHCI_MAX_QHD + EHCI_MAX_ITD + EHCI_MAX_SITD)) { switch ( next_item.type ) diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c index cda5418ff..28c114e1e 100644 --- a/tinyusb/host/usbh.c +++ b/tinyusb/host/usbh.c @@ -243,7 +243,7 @@ void usbh_device_unplugged_isr(uint8_t hostid) usbh_class_drivers[class_code].close) { usbh_class_drivers[class_code].close(dev_addr); - } + } } } |
