From bfb897a0b8ef374981f8604391e3a86fd22049a7 Mon Sep 17 00:00:00 2001 From: Michael Himing Date: Thu, 17 Feb 2022 12:57:27 +1100 Subject: [PATCH] Fix press any key responding slowly on espressif --- ports/espressif/supervisor/usb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ports/espressif/supervisor/usb.c b/ports/espressif/supervisor/usb.c index 30f9be82a3..a4f26b366c 100644 --- a/ports/espressif/supervisor/usb.c +++ b/ports/espressif/supervisor/usb.c @@ -138,3 +138,10 @@ void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char) { mp_sched_keyboard_interrupt(); } } + +void tud_cdc_rx_cb(uint8_t itf) { + (void)itf; + // Workaround for "press any key to enter REPL" response being delayed on espressif. + // Wake main task when any key is pressed. + port_wake_main_task(); +}