diff options
| author | rppicomidi <[email protected]> | 2021-11-12 14:59:19 -0800 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-11-30 17:17:06 +0700 |
| commit | 006522e4375d58bfe01b9745ff7df35fb3d48868 (patch) | |
| tree | 96054ac32b1085d0d67794c2cba76abd12364e94 /src | |
| parent | 06f99c220ef4f53677c5e5354a309cad3b4d11ef (diff) | |
on unplug release device endpoints
Diffstat (limited to 'src')
| -rw-r--r-- | src/host/usbh.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c index f74e7114c..eca72a1c5 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -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; } } |
