drivers: usb_dc_nrfx: clear endpoint flags during ep_disable()
If a loaded endpoint was disabled and then reconfigured, it is not possible to start an IN transfer and usb_dc_ep_write() returns -EAGAIN. Call ep_ctx_reset() to clear endpoint operations flags and reset buffer after endpoint is disabled. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
05ccdd7c40
commit
583334b606
1 changed files with 5 additions and 0 deletions
|
@ -1598,6 +1598,11 @@ int usb_dc_ep_disable(const uint8_t ep)
|
|||
LOG_DBG("EP disable: 0x%02x", ep);
|
||||
|
||||
nrfx_usbd_ep_disable(ep_addr_to_nrfx(ep));
|
||||
/* Clear write_in_progress as nrfx_usbd_ep_disable()
|
||||
* terminates endpoint transaction.
|
||||
*/
|
||||
ep_ctx->write_in_progress = false;
|
||||
ep_ctx_reset(ep_ctx);
|
||||
ep_ctx->cfg.en = false;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue