From 2b0a5b93b78963edf1ceea53d3b9a54145fdf3a1 Mon Sep 17 00:00:00 2001 From: miaoqiongb Date: Wed, 11 Nov 2015 10:43:57 +0800 Subject: [PATCH] Update uart.c Add interrupt enter and leave --- bsp/lpc176x/drivers/uart.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bsp/lpc176x/drivers/uart.c b/bsp/lpc176x/drivers/uart.c index b838609926..29f11ebecd 100644 --- a/bsp/lpc176x/drivers/uart.c +++ b/bsp/lpc176x/drivers/uart.c @@ -60,7 +60,8 @@ void UART0_IRQHandler(void) { rt_ubase_t level, iir; struct rt_uart_lpc *uart = &uart_device; - + /* enter interrupt */ + rt_interrupt_enter(); /* read IIR and clear it */ iir = LPC_UART->IIR; @@ -94,7 +95,8 @@ void UART0_IRQHandler(void) { iir = LPC_UART->LSR; //oe pe fe oe read for clear interrupt } - + /* leave interrupt */ + rt_interrupt_leave(); return; }