void IntUart0(void) //Uart0接收中断
{
#if OS_CRITICAL_METHOD == 3
OS_CPU_SR cpu_sr;
#endif
OS_ENTER_CRITICAL();
OSIntNesting++;
OS_EXIT_CRITICAL();
ulStatus = UARTIntStatus(UART0_BASE, true); // 读取当前中断状态
UARTIntClear(UART0_BASE, ulStatus); // 清除中断状态
if((ulStatus&UART_INT_RT)||(ulStatus&UART_INT_RX))//接收超时中断, 接收中断
{
我的程序
}
else if (ulStatus&UART_INT_TX) // 发送中断
{
我的程序
}
else
{
}
OSIntExit();
}
|