replace dcd_xfer_complete by dcd_xfer_complete()

This commit is contained in:
hathach
2018-10-24 00:44:26 +07:00
parent e7a63324dd
commit 55427606ef
6 changed files with 61 additions and 64 deletions
+7 -9
View File
@@ -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);
}
}