update template

This commit is contained in:
2026-02-18 17:44:38 +08:00
parent d324d5f92a
commit 7419dec1b5
14 changed files with 1076 additions and 281 deletions

View File

@@ -103,10 +103,16 @@ void SysTick_Handler(void) {
}
void USART0_IRQHandler(void) {
// 检查当前配置是否使用USART0,并且函数指针不为空
// 主配置口使用 USART0
if(g_usart_config.usart_periph == USART0 && g_usart_config.irq_handler != 0) {
g_usart_config.irq_handler(); // 通过函数指针调用对应的处理函数
}
// 作为调试口(第二串口)时也接收数据,便于模拟上位机命令
#ifdef DEBUG_MODE
else {
usart0_irq_handler();
}
#endif
}
void USART1_IRQHandler(void) {