mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
nrf5x: Fix endpoint internal state when closed
Field started (regardind transfer) was only cleaed when transfer was finished. For audio devices set interface is called many times. When there is no audio (silence) set interface requests zero lenght bandwithd that in turn calls dcd_edpt_close(). When endpoint is closed due to set interface request transfer should not longer be started since it will block next start transfer with assert. This just sets 'started' to false when endpoint is closed.
This commit is contained in:
parent
101cbf6e31
commit
5e3cfe7b57
@ -438,6 +438,7 @@ void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr)
|
||||
// When both ISO endpoint are close there is no need for SOF any more.
|
||||
if (_dcd.xfer[EP_ISO_NUM][TUSB_DIR_IN].mps + _dcd.xfer[EP_ISO_NUM][TUSB_DIR_OUT].mps == 0) NRF_USBD->INTENCLR = USBD_INTENCLR_SOF_Msk;
|
||||
}
|
||||
_dcd.xfer[epnum][dir].started = false;
|
||||
__ISB(); __DSB();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user