From 689dae1211b4a3a6384a08ec2d7cdf2bb786d53a Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 4 Sep 2017 17:32:14 +1000 Subject: cc3200: Use standard implementation of keyboard interrupt. --- cc3200/mods/pybuart.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cc3200/mods') 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) { -- cgit v1.2.3