diff options
| author | rppicomidi <[email protected]> | 2022-08-12 11:06:36 -0700 |
|---|---|---|
| committer | atoktoto <[email protected]> | 2022-11-13 14:29:16 +0100 |
| commit | 2ddd74fada9b2f272923fce9c3b1926a6e9f5c80 (patch) | |
| tree | 6ec5003dd9a756e0ab7624daf122b4ac30872474 /src/host | |
| parent | e434a1dc0584e841da1ae4ff525bbe81a0f5514b (diff) | |
Add MIDI host support to tinyusb
Diffstat (limited to 'src/host')
| -rw-r--r-- | src/host/hcd.h | 2 | ||||
| -rw-r--r-- | src/host/usbh.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/host/hcd.h b/src/host/hcd.h index deebc59d4..97b668d79 100644 --- a/src/host/hcd.h +++ b/src/host/hcd.h @@ -40,7 +40,7 @@ //--------------------------------------------------------------------+ #ifndef CFG_TUH_ENDPOINT_MAX - #define CFG_TUH_ENDPOINT_MAX (CFG_TUH_HUB + CFG_TUH_HID*2 + CFG_TUH_MSC*2 + CFG_TUH_CDC*3) + #define CFG_TUH_ENDPOINT_MAX (CFG_TUH_HUB + CFG_TUH_HID*2 + CFG_TUH_MSC*2 + CFG_TUH_CDC*3 + CFG_TUH_MIDI*2) // #ifdef TUP_HCD_ENDPOINT_MAX // #define CFG_TUH_ENDPPOINT_MAX TUP_HCD_ENDPOINT_MAX // #else diff --git a/src/host/usbh.c b/src/host/usbh.c index 9d618db92..c59f31596 100644 --- a/src/host/usbh.c +++ b/src/host/usbh.c @@ -166,6 +166,17 @@ static usbh_class_driver_t const usbh_class_drivers[] = }, #endif + #if CFG_TUH_MIDI + { + DRIVER_NAME("MIDI") + .init = midih_init, + .open = midih_open, + .set_config = midih_set_config, + .xfer_cb = midih_xfer_cb, + .close = midih_close + }, + #endif + #if CFG_TUH_HUB { DRIVER_NAME("HUB") |
