This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

2538串口FIFO的使用



因为应用中,串口的收发数据包不超过16字节,为了节省资源,直接利用串口的FIFO功能。

使能timeout 中断,在中断中设置如下:

if(  UARTCharsAvail (HAL_UART_PORT)  )
{
    UartRxFlag = UART_RX_NO_EMPTY;
}

发现:每次上位机发数据,能进中断,但进不去上面的if语句。。。

PS:工程已经屏蔽了ZOOL_P1,以及所有MT开头的defined symbol。

因为附件的大小限制,只上传了重要更改的地方:hal_uart.c