Skip to content

Commit 207562d

Browse files
committed
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>
1 parent 7059e07 commit 207562d

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

shared/tinyusb/mp_usbd.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,12 @@
6161
static inline void mp_usbd_init_tud(void) {
6262
tusb_init();
6363
#if MICROPY_HW_USB_CDC
64-
tud_cdc_configure_fifo_t cfg = { .rx_persistent = 0,
65-
.tx_persistent = 1,
66-
67-
// This config flag is unreleased in TinyUSB >v0.18.0
68-
// but included in Espressif's TinyUSB component since v0.18.0~3
69-
//
70-
// Versioning issue reported as
71-
// https://github.com/espressif/esp-usb/issues/236
72-
#if TUSB_VERSION_NUMBER > 1800 || defined(ESP_PLATFORM)
73-
.tx_overwritabe_if_not_connected = 1,
74-
#endif
64+
tud_cdc_configure_t cfg = {
65+
.rx_persistent = 0,
66+
.tx_persistent = 1,
67+
.tx_overwritabe_if_not_connected = 1,
7568
};
76-
tud_cdc_configure_fifo(&cfg);
69+
tud_cdc_configure(&cfg);
7770
#endif
7871
}
7972

0 commit comments

Comments
 (0)