summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-11-17 15:18:07 +1100
committerDamien George <damien@micropython.org>2025-11-24 12:46:20 +1100
commit207562dfab728211a59503eccec924e68a2b233f (patch)
tree90736b0b7b7f829541ee0c411e82ca19769c8b99 /shared
parent7059e0769e5b53ae838ec4988ed70b246cc2b2fb (diff)
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 <damien@micropython.org>
Diffstat (limited to 'shared')
-rw-r--r--shared/tinyusb/mp_usbd.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/shared/tinyusb/mp_usbd.h b/shared/tinyusb/mp_usbd.h
index b482ec430..311575b3a 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
}