summaryrefslogtreecommitdiff
path: root/src/portable/nordic
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-10-24 00:44:26 +0700
committerhathach <[email protected]>2018-10-24 00:44:26 +0700
commit55427606ef7fbdafa5a9da6b8a0f798dcb619817 (patch)
tree0b76127b0de1ae08fa62359f959228b895101f73 /src/portable/nordic
parente7a63324dd02bb8c8193b26631b4b7ef5d08fd0b (diff)
replace dcd_xfer_complete by dcd_xfer_complete()
Diffstat (limited to 'src/portable/nordic')
-rw-r--r--src/portable/nordic/nrf5x/dcd_nrf5x.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c
index f04acb6e3..d1ca91173 100644
--- a/src/portable/nordic/nrf5x/dcd_nrf5x.c
+++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c
@@ -414,14 +414,12 @@ void USBD_IRQHandler(void)
}
}
- dcd_event_t event = { .rhport = 0 };
-
/*------------- Interrupt Processing -------------*/
if ( int_status & USBD_INTEN_USBRESET_Msk )
{
bus_reset();
- event.event_id = DCD_EVENT_BUS_RESET;
+ dcd_event_t event = { .rhport = 0, .event_id = DCD_EVENT_BUS_RESET };
dcd_event_handler(&event, true);
}
@@ -439,7 +437,7 @@ void USBD_IRQHandler(void)
NRF_USBD->WINDEXL , NRF_USBD->WINDEXH , NRF_USBD->WLENGTHL, NRF_USBD->WLENGTHH
};
- event.event_id = DCD_EVENT_SETUP_RECEIVED;
+ dcd_event_t event = { .rhport = 0, .event_id = DCD_EVENT_SETUP_RECEIVED };
memcpy(&event.setup_received, setup, 8);
dcd_event_handler(&event, true);
@@ -461,7 +459,7 @@ void USBD_IRQHandler(void)
}else
{
// Control IN complete
- dcd_control_complete(0, _dcd.control.actual_len);
+ dcd_event_xfer_complete(0, 0, _dcd.control.actual_len, DCD_XFER_SUCCESS, true);
}
}
}
@@ -475,7 +473,7 @@ void USBD_IRQHandler(void)
}else
{
// Control OUT complete
- dcd_control_complete(0, _dcd.control.actual_len);
+ dcd_event_xfer_complete(0, 0, _dcd.control.actual_len, DCD_XFER_SUCCESS, true);
}
}
@@ -506,7 +504,7 @@ void USBD_IRQHandler(void)
xfer->total_len = xfer->actual_len;
// BULK/INT OUT complete
- dcd_xfer_complete(0, epnum, xfer->actual_len, true);
+ dcd_event_xfer_complete(0, epnum, xfer->actual_len, DCD_XFER_SUCCESS, true);
}
}
@@ -535,7 +533,7 @@ void USBD_IRQHandler(void)
} else
{
// Bulk/Int IN complete
- dcd_xfer_complete(0, epnum | TUSB_DIR_IN_MASK, xfer->actual_len, true);
+ dcd_event_xfer_complete(0, epnum | TUSB_DIR_IN_MASK, xfer->actual_len, DCD_XFER_SUCCESS, true);
}
}
}
@@ -563,7 +561,7 @@ void USBD_IRQHandler(void)
// SOF interrupt
if ( int_status & USBD_INTEN_SOF_Msk )
{
- event.event_id = DCD_EVENT_SOF;
+ dcd_event_t event = { .rhport = 0, .event_id = DCD_EVENT_SOF };
dcd_event_handler(&event, true);
}
}