diff options
| author | hathach <[email protected]> | 2018-03-11 13:59:37 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-11 13:59:37 +0700 |
| commit | 43cf0fb3dfeb87fadeed3b1c0f4ca9ae49df0422 (patch) | |
| tree | 547baee54bceccad9f1f3b1a6cbf4126af18fcf3 /tinyusb/device/usbd.c | |
| parent | bf9fc1b31861c563253e429cbc10ed7362612d5b (diff) | |
refactor dcd_xfer_complete
Diffstat (limited to 'tinyusb/device/usbd.c')
| -rw-r--r-- | tinyusb/device/usbd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c index f090bc141..55bce5626 100644 --- a/tinyusb/device/usbd.c +++ b/tinyusb/device/usbd.c @@ -498,7 +498,7 @@ void tusb_dcd_setup_received(uint8_t port, uint8_t const* p_request) osal_queue_send(usbd_queue_hdl, &task_event);
}
-void usbd_xfer_isr(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xferred_bytes)
+void tusb_dcd_xfer_complete(edpt_hdl_t edpt_hdl, uint32_t xferred_bytes, bool succeeded)
{
if (edpt_hdl.index == 0 )
{
@@ -508,9 +508,9 @@ void usbd_xfer_isr(edpt_hdl_t edpt_hdl, tusb_event_t event, uint32_t xferred_byt {
usbd_task_event_t task_event =
{
- .port = edpt_hdl.port,
+ .port = edpt_hdl.port,
.event_id = USBD_EVENTID_XFER_DONE,
- .sub_event_id = event
+ .sub_event_id = succeeded ? TUSB_EVENT_XFER_COMPLETE : TUSB_EVENT_XFER_ERROR
};
task_event.xfer_done.xferred_byte = xferred_bytes;
|
