|
|
@@ -129,9 +129,9 @@ xMBPortSerialGetByte( CHAR * pucByte )
|
|
|
void USART0_IRQHandler(void)
|
|
|
{
|
|
|
if(usart_interrupt_flag_get(USART0, USART_INT_FLAG_RBNE) != RESET) //接收缓冲区非空中断
|
|
|
- {
|
|
|
- prvvUARTRxISR();
|
|
|
- usart_interrupt_flag_clear(USART0, USART_INT_FLAG_RBNE); //清除USART1中断挂起
|
|
|
+ {
|
|
|
+ usart_interrupt_flag_clear(USART0, USART_INT_FLAG_RBNE); //清除USART1中断挂起
|
|
|
+ prvvUARTRxISR();
|
|
|
}
|
|
|
|
|
|
if(usart_flag_get(USART0, USART_FLAG_ORERR) == SET) //溢出错误标志为1
|
|
|
@@ -140,14 +140,16 @@ void USART0_IRQHandler(void)
|
|
|
prvvUARTRxISR();
|
|
|
}
|
|
|
if(usart_interrupt_flag_get(USART0, USART_INT_FLAG_TBE)!= RESET) //发送缓冲区空中断
|
|
|
- {
|
|
|
+ {
|
|
|
+ usart_interrupt_flag_clear(USART0, USART_INT_FLAG_TBE); //清除发送中断标志
|
|
|
prvvUARTTxReadyISR();
|
|
|
- usart_interrupt_flag_clear(USART0, USART_INT_FLAG_TBE); //清除发送中断标志
|
|
|
+
|
|
|
}
|
|
|
if(usart_interrupt_flag_get(USART0, USART_INT_FLAG_TC)!= RESET) //发送完成中断
|
|
|
- {
|
|
|
- prvvUARTTxReadyISR();
|
|
|
+ {
|
|
|
usart_interrupt_flag_clear(USART0, USART_INT_FLAG_TC); //清除发送完成中断
|
|
|
+ prvvUARTTxReadyISR();
|
|
|
+
|
|
|
// gpio_bit_reset(GPIOA, GPIO_PIN_8); //接收
|
|
|
}
|
|
|
}
|