This commit is contained in:
bmy
2024-05-19 16:07:33 +08:00

View File

@@ -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 */