update template
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user