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.
This commit is contained in:
Scott Shawcroft
2018-11-16 17:03:33 -08:00
parent 6ed96cb93b
commit a3173b8de4
7 changed files with 712 additions and 1 deletions

View File

@@ -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,