FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

shared/tinyusb: Add back runtime CDC config for older TinyUSB. · micropython/micropython@0414173 · GitHub

Commit 0414173

Browse files
committed
shared/tinyusb: Add back runtime CDC config for older TinyUSB.
Commit 6bde1b5 removed this configuration because TinyUSB 0.21.0 no longer uses it. But the esp32 port still uses an older TinyUSB version/fork (based on TinyUSB 0.18.0) and therefore still needs this runtime CDC configuration. Signed-off-by: Damien George <damien@micropython.org>
1 parent 9704681 commit 0414173

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎shared/tinyusb/mp_usbd.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@
6464
// Initialise TinyUSB device.
6565
static inline void mp_usbd_init_tud(void) {
6666
tusb_init();
67+
#if TUSB_VERSION_NUMBER < 2100 && MICROPY_HW_USB_CDC
68+
// TinyUSB prior to 0.21.0 had TX persistence configurable at runtime.
69+
tud_cdc_configure_t cfg = {
70+
.rx_persistent = 0,
71+
.tx_persistent = 1,
72+
.tx_overwritabe_if_not_connected = 1,
73+
};
74+
tud_cdc_configure(&cfg);
75+
#endif
6776
}
6877

6978
// Run the TinyUSB device task

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL