优化PIBot的驱动,解决串口打印导致死机问题

main
詹力 2024-11-09 01:05:12 +08:00
parent 0103fa823d
commit a50a6187b5
1 changed files with 9 additions and 0 deletions

View File

@ -160,6 +160,15 @@ void USART3_IRQHandler(void)
} }
} }
void USART1_IRQHandler(void)
{
if (USART_GetITStatus(USART1, USART_IT_RXNE) != RESET)
{
USART_ReceiveData(USART1);
USART_ClearITPendingBit(USART1,USART_IT_RXNE); //clear interrupt flag
}
}
/******************************************************************************/ /******************************************************************************/
/* STM32F10x Peripherals Interrupt Handlers */ /* STM32F10x Peripherals Interrupt Handlers */
/* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */ /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */