summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-12-21 15:53:11 +0700
committerGitHub <[email protected]>2023-12-21 15:53:11 +0700
commit804f6718ed422ff6aa0dc4f4d547053b1d05c699 (patch)
tree4e23a9fbc1adc032c276606c6aff4a0f7742248b /src
parentb9be733c3ca4bdab80e42f5d46335f752f02971b (diff)
parent7f84fe9bdad2b3d7e2fc48b7dedb8bbdf305bf57 (diff)
Merge pull request #2385 from kasjer/kasjer/nrf5x-fix-dcd_edpt_open-for-iso
dcd_nrf5x: Fix dcd_edpt_open for iso endpoint
Diffstat (limited to 'src')
-rw-r--r--src/portable/nordic/nrf5x/dcd_nrf5x.c7
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;