From a50a6187b54086f7f84508e446f934259404b2c9 Mon Sep 17 00:00:00 2001 From: zhanli <719901725@qq.com> Date: Sat, 9 Nov 2024 01:05:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96PIBot=E7=9A=84=E9=A9=B1?= =?UTF-8?q?=E5=8A=A8=EF=BC=8C=E8=A7=A3=E5=86=B3=E4=B8=B2=E5=8F=A3=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E5=AF=BC=E8=87=B4=E6=AD=BB=E6=9C=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Hardware/Pibot驱动底盘/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp b/Hardware/Pibot驱动底盘/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp index bf047fe..ef1803b 100644 --- a/Hardware/Pibot驱动底盘/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp +++ b/Hardware/Pibot驱动底盘/PiRobot_Firmware v1.0/STM32/User/stm32f10x_it.cpp @@ -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 */ /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */