summaryrefslogtreecommitdiff
path: root/src/device/usbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/usbd.c')
-rw-r--r--src/device/usbd.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 2853b619b..863add2c5 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -1,4 +1,4 @@
-/*
+/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach (tinyusb.org)
@@ -182,7 +182,19 @@ static usbd_class_driver_t const _usbd_driver[] =
.reset = dfu_rtd_reset,
.open = dfu_rtd_open,
.control_xfer_cb = dfu_rtd_control_xfer_cb,
- .xfer_cb = dfu_rtd_xfer_cb,
+ .xfer_cb = NULL,
+ .sof = NULL
+ },
+ #endif
+
+ #if CFG_TUD_DFU_MODE
+ {
+ DRIVER_NAME("DFU-MODE")
+ .init = dfu_moded_init,
+ .reset = dfu_moded_reset,
+ .open = dfu_moded_open,
+ .control_xfer_cb = dfu_moded_control_xfer_cb,
+ .xfer_cb = NULL,
.sof = NULL
},
#endif
@@ -1318,9 +1330,9 @@ bool usbd_edpt_stalled(uint8_t rhport, uint8_t ep_addr)
/**
* usbd_edpt_close will disable an endpoint.
- *
+ *
* In progress transfers on this EP may be delivered after this call.
- *
+ *
*/
void usbd_edpt_close(uint8_t rhport, uint8_t ep_addr)
{