esp8266/esp_mphal: Handle Ctrl+C from dupterm (e.g. WebREPL).
This commit is contained in:
parent
116eeee6db
commit
4681b86850
@ -176,6 +176,10 @@ static int call_dupterm_read(void) {
|
||||
mp_uos_deactivate("dupterm: EOF received, deactivating\n", MP_OBJ_NULL);
|
||||
return -1;
|
||||
}
|
||||
if (*(byte*)bufinfo.buf == interrupt_char) {
|
||||
mp_keyboard_interrupt();
|
||||
return -2;
|
||||
}
|
||||
return *(byte*)bufinfo.buf;
|
||||
} else {
|
||||
mp_uos_deactivate("dupterm: Exception in read() method, deactivating: ", nlr.ret_val);
|
||||
|
@ -29,6 +29,9 @@
|
||||
|
||||
#include "py/ringbuf.h"
|
||||
|
||||
void mp_keyboard_interrupt(void);
|
||||
extern int interrupt_char;
|
||||
|
||||
struct _mp_print_t;
|
||||
// Structure for UART-only output via mp_printf()
|
||||
extern const struct _mp_print_t mp_debug_print;
|
||||
|
Loading…
Reference in New Issue
Block a user