summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorScott Shawcroft <[email protected]>2018-11-16 17:03:33 -0800
committerScott Shawcroft <[email protected]>2019-01-04 12:16:27 -0800
commita3173b8de48b37e802d4de45821d2efbf54b1652 (patch)
treeb5ae0e2a2479f3fd401334c8c91e6e8fd9ac70b6 /src/device
parent6ed96cb93b92acf7cce3bd6b84dc5cd8882486c4 (diff)
Add USB Midi support.
It also introduces a txbuffer which copies data into it but passes the buffer straight to the USB rather than another copy.
Diffstat (limited to 'src/device')
-rw-r--r--src/device/usbd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c
index a3fbfdff9..9c08a7932 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -128,6 +128,19 @@ static usbd_class_driver_t const usbd_class_drivers[] =
},
#endif
+ #if CFG_TUD_MIDI
+ {
+ .class_code = TUSB_CLASS_AUDIO,
+ .init = midid_init,
+ .open = midid_open,
+ .control_request = midid_control_request,
+ .control_request_complete = midid_control_request_complete,
+ .xfer_cb = midid_xfer_cb,
+ .sof = NULL,
+ .reset = midid_reset
+ },
+ #endif
+
#if CFG_TUD_CUSTOM_CLASS
{
.class_code = TUSB_CLASS_VENDOR_SPECIFIC,