diff options
Diffstat (limited to 'cc3200/mods/pybuart.c')
-rw-r--r-- | cc3200/mods/pybuart.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc3200/mods/pybuart.c b/cc3200/mods/pybuart.c index ecd3d441b..135e0f2a3 100644 --- a/cc3200/mods/pybuart.c +++ b/cc3200/mods/pybuart.c @@ -35,6 +35,7 @@ #include "py/objlist.h" #include "py/stream.h" #include "py/mphal.h" +#include "lib/utils/interrupt_char.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "inc/hw_memmap.h" @@ -251,9 +252,9 @@ STATIC void UARTGenericIntHandler(uint32_t uart_id) { MAP_UARTIntClear(self->reg, UART_INT_RX | UART_INT_RT); while (UARTCharsAvail(self->reg)) { int data = MAP_UARTCharGetNonBlocking(self->reg); - if (MP_STATE_PORT(os_term_dup_obj) && MP_STATE_PORT(os_term_dup_obj)->stream_o == self && data == user_interrupt_char) { + if (MP_STATE_PORT(os_term_dup_obj) && MP_STATE_PORT(os_term_dup_obj)->stream_o == self && data == mp_interrupt_char) { // raise an exception when interrupts are finished - mpexception_keyboard_nlr_jump(); + mp_keyboard_interrupt(); } else { // there's always a read buffer available uint16_t next_head = (self->read_buf_head + 1) % PYBUART_RX_BUFFER_LEN; if (next_head != self->read_buf_tail) { |