From 7c3975ecf236b3da573af7dc345801e02022c163 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 2 Apr 2021 17:57:56 +0700 Subject: [PATCH] update tinyusb to fix midi buffer overflow issue --- lib/tinyusb | 2 +- shared-module/usb_midi/PortIn.c | 2 +- shared-module/usb_midi/PortOut.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tinyusb b/lib/tinyusb index 2adb7e7193..ab4d30fd6b 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 2adb7e719316b12c53a907153cfa0056db1abd70 +Subproject commit ab4d30fd6bca02c73eb9b4ff82db0b2b0f403344 diff --git a/shared-module/usb_midi/PortIn.c b/shared-module/usb_midi/PortIn.c index 31e320baab..e00a5124cf 100644 --- a/shared-module/usb_midi/PortIn.c +++ b/shared-module/usb_midi/PortIn.c @@ -29,7 +29,7 @@ #include "tusb.h" size_t common_hal_usb_midi_portin_read(usb_midi_portin_obj_t *self, uint8_t *data, size_t len, int *errcode) { - return tud_midi_read(data, len); + return tud_midi_stream_read(data, len); } uint32_t common_hal_usb_midi_portin_bytes_available(usb_midi_portin_obj_t *self) { diff --git a/shared-module/usb_midi/PortOut.c b/shared-module/usb_midi/PortOut.c index 0b37dcfd41..f453a67671 100644 --- a/shared-module/usb_midi/PortOut.c +++ b/shared-module/usb_midi/PortOut.c @@ -29,7 +29,7 @@ #include "tusb.h" size_t common_hal_usb_midi_portout_write(usb_midi_portout_obj_t *self, const uint8_t *data, size_t len, int *errcode) { - return tud_midi_write(0, data, len); + return tud_midi_stream_write(0, data, len); } bool common_hal_usb_midi_portout_ready_to_tx(usb_midi_portout_obj_t *self) {