Interrupt on UART 'break'

Tested and working with the CH9102F USB converter on Adafruit's
Feather ESP32 V2 (& tio as the software on the host computer)

Closes: #7233
This commit is contained in:
Jeff Epler 2022-11-19 10:50:12 -06:00
parent c837ac4f3a
commit 4e0f8e7fcd
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -49,8 +49,9 @@ static void uart_event_task(void *param) {
while (true) {
if (xQueueReceive(self->event_queue, &event, portMAX_DELAY)) {
switch (event.type) {
case UART_BREAK:
case UART_PATTERN_DET:
// When the console uart receives CTRL+C, wake the main task and schedule a keyboard interrupt
// When the console uart receives CTRL+C or BREAK, wake the main task and schedule a keyboard interrupt
if (self->is_console) {
port_wake_main_task();
if (mp_interrupt_char == CHAR_CTRL_C) {