summaryrefslogtreecommitdiff
path: root/esp8266/uart.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-09-29 10:13:17 -0700
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-09-29 10:15:38 -0700
commit6ab2c5e6cc6359c3419a9d8ee61b4e586864d048 (patch)
treeb27471a8e09a8cff12978cc7930a3ddf31cb2cde /esp8266/uart.c
parent53bfcc9e848c43e58694c7cb7a2356b31fc67445 (diff)
lib/interrupt_char: Factor out typical Ctrl+C handling from esp8266 port.
Utility functions for keyboard interrupt handling, to be reused across (baremetal) ports.
Diffstat (limited to 'esp8266/uart.c')
-rw-r--r--esp8266/uart.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/esp8266/uart.c b/esp8266/uart.c
index d724331c4..001a9c673 100644
--- a/esp8266/uart.c
+++ b/esp8266/uart.c
@@ -39,8 +39,6 @@ static void uart0_rx_intr_handler(void *para);
void soft_reset(void);
void mp_keyboard_interrupt(void);
-int interrupt_char;
-
/******************************************************************************
* FunctionName : uart_config
* Description : Internal used function
@@ -172,7 +170,7 @@ static void uart0_rx_intr_handler(void *para) {
while (READ_PERI_REG(UART_STATUS(uart_no)) & (UART_RXFIFO_CNT << UART_RXFIFO_CNT_S)) {
uint8 RcvChar = READ_PERI_REG(UART_FIFO(uart_no)) & 0xff;
- if (RcvChar == interrupt_char) {
+ if (RcvChar == mp_interrupt_char) {
mp_keyboard_interrupt();
} else {
ringbuf_put(&input_buf, RcvChar);