summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index c92884334..572708f7d 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -145,6 +145,22 @@ 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 = TUSB_CLASS_APPLICATION_SPECIFIC,
+ .init = usbtmcd_init,
+ .reset = usbtmcd_reset,
+ .open = usbtmcd_open,
+ .control_request = usbtmcd_control_request,
+ .control_complete = usbtmcd_control_complete,
+ .xfer_cb = usbtmcd_xfer_cb,
+ .sof = NULL
+ },
+ #endif
};
enum { USBD_CLASS_DRIVER_COUNT = TU_ARRAY_SIZE(usbd_class_drivers) };