mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-11 18:40:45 +00:00
on unplug release device endpoints
This commit is contained in:
parent
06f99c220e
commit
006522e437
@ -546,6 +546,9 @@ void process_device_unplugged(uint8_t rhport, uint8_t hub_addr, uint8_t hub_port
|
||||
|
||||
hcd_device_close(rhport, dev_addr);
|
||||
|
||||
// release all endpoints associated with the device
|
||||
tu_memclr(dev->ep_status, sizeof(dev->ep_status));
|
||||
|
||||
dev->state = TUSB_DEVICE_STATE_UNPLUG;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user