drivers: usb_dc_sam: free endpoint memory on End of Reset event
Free endpoint memory on End of Reset event (EORST). Fixes: #24626 Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
29d95ba1d4
commit
5a3d44256e
1 changed files with 6 additions and 0 deletions
|
@ -256,6 +256,12 @@ static void usb_dc_isr(void)
|
|||
usb_dc_ep_enable_interrupts(0);
|
||||
}
|
||||
|
||||
/* Free all endpoint memory */
|
||||
for (int idx = 1; idx < NUM_OF_EP_MAX; idx++) {
|
||||
usb_dc_ep_disable(idx);
|
||||
USBHS->USBHS_DEVEPTCFG[idx] &= ~USBHS_DEVEPTCFG_ALLOC;
|
||||
}
|
||||
|
||||
/* Callback function */
|
||||
dev_data.status_cb(USB_DC_RESET, NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue