Add tuh_rhport_is_active() and tuh_rhport_reset_bus()

- also improve ehci bus reset
- seperate bus reset delay and contact debouncing delay in enumeration
This commit is contained in:
hathach
2023-08-07 18:22:28 +07:00
parent 1b92108bc3
commit 1f95a417f2
6 changed files with 128 additions and 103 deletions

View File

@@ -330,7 +330,7 @@ static void connection_port_reset_complete (tuh_xfer_t* xfer);
bool hub_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t result, uint32_t xferred_bytes) {
(void) xferred_bytes; // TODO can be more than 1 for hub with lots of ports
(void) ep_addr;
TU_ASSERT(result == XFER_RESULT_SUCCESS);
TU_VERIFY(result == XFER_RESULT_SUCCESS);
hub_interface_t* p_hub = get_itf(dev_addr);