diff --git a/shared/tinyusb/mp_cdc_common.c b/shared/tinyusb/mp_cdc_common.c index cd4f5d1013..4ccae4bac1 100644 --- a/shared/tinyusb/mp_cdc_common.c +++ b/shared/tinyusb/mp_cdc_common.c @@ -39,7 +39,13 @@ STATIC void usbd_cdc_run_bootloader_task(mp_sched_node_t *node) { machine_bootloader(0, NULL); } -void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) { +void +#if MICROPY_HW_USB_EXTERNAL_TINYUSB +mp_usbd_line_state_cb +#else +tud_cdc_line_state_cb +#endif + (uint8_t itf, bool dtr, bool rts) { if (dtr == false && rts == false) { // Device is disconnected. cdc_line_coding_t line_coding;