Skip to content

Commit 4e0f8e7

Browse files
committed
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: adafruit#7233
1 parent c837ac4 commit 4e0f8e7

File tree

1 file changed

+2
-1
lines changed
  • ports/espressif/common-hal/busio

1 file changed

+2
-1
lines changed

ports/espressif/common-hal/busio/UART.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ static void uart_event_task(void *param) {
4949
while (true) {
5050
if (xQueueReceive(self->event_queue, &event, portMAX_DELAY)) {
5151
switch (event.type) {
52+
case UART_BREAK:
5253
case UART_PATTERN_DET:
53-
// When the console uart receives CTRL+C, wake the main task and schedule a keyboard interrupt
54+
// When the console uart receives CTRL+C or BREAK, wake the main task and schedule a keyboard interrupt
5455
if (self->is_console) {
5556
port_wake_main_task();
5657
if (mp_interrupt_char == CHAR_CTRL_C) {

0 commit comments

Comments
 (0)