add delay ms safe & add led heart beat

This commit is contained in:
2025-08-13 00:56:55 +08:00
parent 1dde17d211
commit e9a96aec6a
6 changed files with 68 additions and 2 deletions

View File

@@ -57,9 +57,10 @@ int main(void)
led_init();
printf("Hello USART0!");
led_off();
// 移除led_off()调用让心跳函数控制LED
while(1){
delay_ms(100);
// 使用不会干扰SysTick中断的安全延时函数
delay_ms_safe(100);
command_process();
}
}