提交 6d738f79 编写于 作者: B Bernard Xiong

Merge pull request #579 from miaoqiongb/patch-2

[BSP] Update uart.c in lpc176x
...@@ -60,7 +60,8 @@ void UART0_IRQHandler(void) ...@@ -60,7 +60,8 @@ void UART0_IRQHandler(void)
{ {
rt_ubase_t level, iir; rt_ubase_t level, iir;
struct rt_uart_lpc *uart = &uart_device; struct rt_uart_lpc *uart = &uart_device;
/* enter interrupt */
rt_interrupt_enter();
/* read IIR and clear it */ /* read IIR and clear it */
iir = LPC_UART->IIR; iir = LPC_UART->IIR;
...@@ -94,7 +95,8 @@ void UART0_IRQHandler(void) ...@@ -94,7 +95,8 @@ void UART0_IRQHandler(void)
{ {
iir = LPC_UART->LSR; //oe pe fe oe read for clear interrupt iir = LPC_UART->LSR; //oe pe fe oe read for clear interrupt
} }
/* leave interrupt */
rt_interrupt_leave();
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册