mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-25 10:43:44 +00:00
Merge pull request #2546 from tannewt/unplug_on_deinit
Fake unplug devices when a root hub is deinit
This commit is contained in:
commit
5ff6e0f992
@ -412,9 +412,11 @@ bool tuh_deinit(uint8_t rhport) {
|
|||||||
// deinit host controller
|
// deinit host controller
|
||||||
hcd_int_disable(rhport);
|
hcd_int_disable(rhport);
|
||||||
hcd_deinit(rhport);
|
hcd_deinit(rhport);
|
||||||
|
|
||||||
_usbh_controller = TUSB_INDEX_INVALID_8;
|
_usbh_controller = TUSB_INDEX_INVALID_8;
|
||||||
|
|
||||||
|
// "unplug" all devices on this rhport (hub_addr = 0, hub_port = 0)
|
||||||
|
process_removing_device(rhport, 0, 0);
|
||||||
|
|
||||||
// deinit host stack if no controller is active
|
// deinit host stack if no controller is active
|
||||||
if (!tuh_inited()) {
|
if (!tuh_inited()) {
|
||||||
// Class drivers
|
// Class drivers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user