From 207562dfab728211a59503eccec924e68a2b233f Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 17 Nov 2025 15:18:07 +1100 Subject: [PATCH] shared/tinyusb: Remove macro guard for tx_overwritabe_if_not_connected. It's now available in the version of TinyUSB used by this repository. Also, update to the newer `tud_cdc_configure_t` struct name and newer `tud_cdc_configure()` function name. Signed-off-by: Damien George --- shared/tinyusb/mp_usbd.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/shared/tinyusb/mp_usbd.h b/shared/tinyusb/mp_usbd.h index b482ec4306..311575b3ad 100644 --- a/shared/tinyusb/mp_usbd.h +++ b/shared/tinyusb/mp_usbd.h @@ -61,19 +61,12 @@ static inline void mp_usbd_init_tud(void) { tusb_init(); #if MICROPY_HW_USB_CDC - tud_cdc_configure_fifo_t cfg = { .rx_persistent = 0, - .tx_persistent = 1, - - // This config flag is unreleased in TinyUSB >v0.18.0 - // but included in Espressif's TinyUSB component since v0.18.0~3 - // - // Versioning issue reported as - // https://github.com/espressif/esp-usb/issues/236 - #if TUSB_VERSION_NUMBER > 1800 || defined(ESP_PLATFORM) - .tx_overwritabe_if_not_connected = 1, - #endif + tud_cdc_configure_t cfg = { + .rx_persistent = 0, + .tx_persistent = 1, + .tx_overwritabe_if_not_connected = 1, }; - tud_cdc_configure_fifo(&cfg); + tud_cdc_configure(&cfg); #endif }