diff --git a/ports/esp32s2/supervisor/usb.c b/ports/esp32s2/supervisor/usb.c index 2289b01cc0..41eeb1138b 100644 --- a/ports/esp32s2/supervisor/usb.c +++ b/ports/esp32s2/supervisor/usb.c @@ -120,7 +120,7 @@ void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char) { // Compare mp_interrupt_char with wanted_char and ignore if not matched if (mp_interrupt_char == wanted_char) { tud_cdc_read_flush(); // flush read fifo - mp_keyboard_interrupt(); + mp_sched_keyboard_interrupt(); // CircuitPython's VM is run in a separate FreeRTOS task from TinyUSB. // So, we must notify the other task when a CTRL-C is received. xTaskNotifyGive(circuitpython_task); diff --git a/ports/nrf/bluetooth/ble_uart.c b/ports/nrf/bluetooth/ble_uart.c index 022b866ce6..6b1fed1ad5 100644 --- a/ports/nrf/bluetooth/ble_uart.c +++ b/ports/nrf/bluetooth/ble_uart.c @@ -81,7 +81,7 @@ STATIC void on_ble_evt(ble_evt_t *ble_evt, void *param) { for (size_t i = 0; i < write->len; ++i) { #if MICROPY_KBD_EXCEPTION if (write->data[i] == mp_interrupt_char) { - mp_keyboard_interrupt(); + mp_sched_keyboard_interrupt(); } else #endif { diff --git a/ports/stm/common-hal/busio/UART.c b/ports/stm/common-hal/busio/UART.c index ecaee84d3f..621cce6cfd 100644 --- a/ports/stm/common-hal/busio/UART.c +++ b/ports/stm/common-hal/busio/UART.c @@ -355,7 +355,7 @@ void HAL_UART_RxCpltCallback(UART_HandleTypeDef *handle) { if (context->sigint_enabled) { if (context->rx_char == CHAR_CTRL_C) { common_hal_busio_uart_clear_rx_buffer(context); - mp_keyboard_interrupt(); + mp_sched_keyboard_interrupt(); } } diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index 0e1c3472eb..9a276aa6cc 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -293,7 +293,7 @@ void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char) { // Compare mp_interrupt_char with wanted_char and ignore if not matched if (mp_interrupt_char == wanted_char) { tud_cdc_n_read_flush(itf); // flush read fifo - mp_keyboard_interrupt(); + mp_sched_keyboard_interrupt(); } }