feat: 增加蓝牙遥控复位功能
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user