From 682f47977105fb5b3d7776b00fa45ccc7b0de112 Mon Sep 17 00:00:00 2001 From: bmy <2583236812@qq.com> Date: Sun, 5 May 2024 22:14:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=93=9D=E7=89=99?= =?UTF-8?q?=E9=81=A5=E6=8E=A7=E5=A4=8D=E4=BD=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/src/at32f403a_407_int.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/src/at32f403a_407_int.c b/project/src/at32f403a_407_int.c index 9770b09..ca6e2f7 100644 --- a/project/src/at32f403a_407_int.c +++ b/project/src/at32f403a_407_int.c @@ -249,7 +249,10 @@ void USART2_IRQHandler(void) { /* add user code begin USART2_IRQ 0 */ if (SET == usart_flag_get(USART2, USART_RDBF_FLAG)) { - usart_data_receive(USART2); + uint8_t data = usart_data_receive(USART2); + if(data == 0x06){ + nvic_system_reset(); + } usart_flag_clear(USART2, USART_RDBF_FLAG); } /* add user code end USART2_IRQ 0 */