diff options
| author | Ha Thach <[email protected]> | 2023-12-21 15:53:11 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-21 15:53:11 +0700 |
| commit | 804f6718ed422ff6aa0dc4f4d547053b1d05c699 (patch) | |
| tree | 4e23a9fbc1adc032c276606c6aff4a0f7742248b | |
| parent | b9be733c3ca4bdab80e42f5d46335f752f02971b (diff) | |
| parent | 7f84fe9bdad2b3d7e2fc48b7dedb8bbdf305bf57 (diff) | |
Merge pull request #2385 from kasjer/kasjer/nrf5x-fix-dcd_edpt_open-for-iso
dcd_nrf5x: Fix dcd_edpt_open for iso endpoint
| -rw-r--r-- | src/portable/nordic/nrf5x/dcd_nrf5x.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index acc967bb3..4e702aed4 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -340,6 +340,9 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt) NRF_USBD->INTENSET = TU_BIT(USBD_INTEN_ENDEPIN0_Pos + epnum); NRF_USBD->EPINEN |= TU_BIT(epnum); } + // clear stall and reset DataToggle + NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep_addr; + NRF_USBD->DTOGGLE = (USBD_DTOGGLE_VALUE_Data0 << USBD_DTOGGLE_VALUE_Pos) | ep_addr; } else { @@ -375,10 +378,6 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt) } } - // clear stall and reset DataToggle - NRF_USBD->EPSTALL = (USBD_EPSTALL_STALL_UnStall << USBD_EPSTALL_STALL_Pos) | ep_addr; - NRF_USBD->DTOGGLE = (USBD_DTOGGLE_VALUE_Data0 << USBD_DTOGGLE_VALUE_Pos) | ep_addr; - __ISB(); __DSB(); return true; |
