mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 01:10:20 +08:00
Update uart.c
Add interrupt enter and leave
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user