summaryrefslogtreecommitdiff
path: root/src/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-02-13 15:52:30 +0700
committerhathach <[email protected]>2025-02-13 15:54:31 +0700
commitbad6cbe48930c0c5250b8a717a46cc1f6d83de56 (patch)
tree6cc4d134451896e34d8570e3d682cc92ab5f6cc9 /src/host
parente0b192b633e70338ef5ac88c7f5a49f37867b289 (diff)
update midi host to use endpoint stream API
Diffstat (limited to 'src/host')
-rw-r--r--src/host/usbh.c3
-rw-r--r--src/host/usbh.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/host/usbh.c b/src/host/usbh.c
index f874121a3..e6b6cd91c 100644
--- a/src/host/usbh.c
+++ b/src/host/usbh.c
@@ -192,6 +192,7 @@ static usbh_class_driver_t const usbh_class_drivers[] = {
{
.name = DRIVER_NAME("MIDI"),
.init = midih_init,
+ .deinit = midih_deinit,
.open = midih_open,
.set_config = midih_set_config,
.xfer_cb = midih_xfer_cb,
@@ -1672,7 +1673,7 @@ static bool _parse_configuration_descriptor(uint8_t dev_addr, tusb_desc_configur
if ( 0 == tu_desc_len(p_desc) ) {
// A zero length descriptor indicates that the device is off spec (e.g. wrong wTotalLength).
// Parsed interfaces should still be usable
- TU_LOG_USBH("Encountered a zero-length descriptor after %u bytes\r\n", (uint32_t)p_desc - (uint32_t)desc_cfg);
+ TU_LOG_USBH("Encountered a zero-length descriptor after %" PRIu32 " bytes\r\n", (uint32_t)p_desc - (uint32_t)desc_cfg);
break;
}
diff --git a/src/host/usbh.h b/src/host/usbh.h
index 3bcdd3657..7fc8ea826 100644
--- a/src/host/usbh.h
+++ b/src/host/usbh.h
@@ -37,6 +37,9 @@
// MACRO CONSTANT TYPEDEF
//--------------------------------------------------------------------+
+// Endpoint Bulk size depending on host mx speed
+#define TUH_EPSIZE_BULK_MPS (TUD_OPT_HIGH_SPEED ? TUSB_EPSIZE_BULK_HS : TUSB_EPSIZE_BULK_FS)
+
// forward declaration
struct tuh_xfer_s;
typedef struct tuh_xfer_s tuh_xfer_t;