summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-08-29 20:56:51 +0200
committerGitHub <[email protected]>2024-08-29 20:56:51 +0200
commited0d58749d5a193248f504e06695e4122a24d35d (patch)
tree40f516c683a6cbdda01e8b5f31d9a6c7604188ec /src
parent669f341b0be27fb9024e0ed8b5e64cfe6a83cb8a (diff)
parent1d2c9f929dd3bfaf82741da30e8dbf97b0ff385c (diff)
Merge pull request #2782 from rgrr/fix-dcd_nrf5x-wrong-order
dcd_nrf5x: fix race condition
Diffstat (limited to 'src')
-rw-r--r--src/portable/nordic/nrf5x/dcd_nrf5x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c
index 1cc5c1836..a63e442f3 100644
--- a/src/portable/nordic/nrf5x/dcd_nrf5x.c
+++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c
@@ -441,11 +441,11 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t* buffer, uint16_t to
bool const control_status = (epnum == 0 && total_bytes == 0 && dir != tu_edpt_dir(NRF_USBD->BMREQUESTTYPE));
if (control_status) {
- // Status Phase also requires EasyDMA has to be available as well !!!!
- edpt_dma_start(&NRF_USBD->TASKS_EP0STATUS);
-
// The nRF doesn't interrupt on status transmit so we queue up a success response.
dcd_event_xfer_complete(0, ep_addr, 0, XFER_RESULT_SUCCESS, is_in_isr());
+
+ // Status Phase also requires EasyDMA has to be available as well !!!!
+ edpt_dma_start(&NRF_USBD->TASKS_EP0STATUS);
} else if (dir == TUSB_DIR_OUT) {
xfer->started = true;
if (epnum == 0) {