Also cleanup unaddressed device.

Signed-off-by: HiFiPhile <admin@hifiphile.com>
This commit is contained in:
HiFiPhile
2025-04-18 17:47:53 +02:00
committed by hathach
parent 3c4e6a779d
commit 7ba63a6302

View File

@@ -566,6 +566,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr) {
if ((event.rhport == _dev0.rhport) && (event.connection.hub_addr == _dev0.hub_addr) &&
(event.connection.hub_port == _dev0.hub_port)) {
_dev0.enumerating = 0;
hcd_device_close(_dev0.rhport, _dev0.hub_addr);
if (_ctrl_xfer.daddr == 0) {
_set_control_xfer_stage(CONTROL_STAGE_IDLE);
}