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.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index 50964bdee..3700fb988 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -145,6 +145,23 @@ static usbd_class_driver_t const usbd_class_drivers[] =
.sof = NULL
},
#endif
+
+ #if CFG_TUD_USBTMC
+ // Presently USBTMC is the only defined class with the APP_SPECIFIC class code.
+ // We maybe need to add subclass codes here, or a callback to ask if a driver can
+ // handle a particular interface.
+ {
+ .class_code = TUD_USBTMC_APP_CLASS,
+ //.subclass_code = TUD_USBTMC_APP_SUBCLASS
+ .init = usbtmcd_init_cb,
+ .reset = usbtmcd_reset_cb,
+ .open = usbtmcd_open_cb,
+ .control_request = usbtmcd_control_request_cb,
+ .control_complete = usbtmcd_control_complete_cb,
+ .xfer_cb = usbtmcd_xfer_cb,
+ .sof = NULL
+ },
+ #endif
};
enum { USBD_CLASS_DRIVER_COUNT = TU_ARRAY_SIZE(usbd_class_drivers) };