summaryrefslogtreecommitdiff
path: root/tinyusb/host/usbh.c
diff options
context:
space:
mode:
Diffstat (limited to 'tinyusb/host/usbh.c')
-rw-r--r--tinyusb/host/usbh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tinyusb/host/usbh.c b/tinyusb/host/usbh.c
index 0589bad2c..e701d2605 100644
--- a/tinyusb/host/usbh.c
+++ b/tinyusb/host/usbh.c
@@ -304,13 +304,16 @@ static void usbh_device_unplugged(uint8_t hostid, uint8_t hub_addr, uint8_t hub_
usbh_class_drivers[class_index].close(dev_addr);
}
}
- usbh_pipe_control_close(dev_addr);
+ // TODO refractor
// set to REMOVING to allow HCD to clean up its cached data for this device
// HCD must set this device's state to TUSB_DEVICE_STATE_UNPLUG when done
usbh_devices[dev_addr].state = TUSB_DEVICE_STATE_REMOVING;
usbh_devices[dev_addr].flag_supported_class = 0;
+ usbh_pipe_control_close(dev_addr);
+
+
is_found = true;
}
}