summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2019-09-14 12:13:11 -0400
committerNathan Conrad <[email protected]>2019-09-14 13:35:08 -0400
commit1cae96951f59e7549ff1a2d5643cda66784c22a1 (patch)
tree501556a1f3915c88c2019d06a8b455dee13a9fc6 /src/device
parentac8c343fef785c9aa19ba628f746e72774b9e8c8 (diff)
Add usbtmc class driver.
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) };