資源簡介
STM32時(shí)分法多任務(wù)處理例程
代碼片段和文件信息
#include?
__IO??u16??Delay_Led=0;??//需要在stm32f10x_it.c里外部聲明
__IO??u16??Delay_Key=0;
__IO??u16??Delay_Power=0;
int?main()
{
???SystemInit();
???
???while(1)
???{
?????Led_Status();
?????Key_Status();
?????Power_Status();
???}
}
void?SysTick_Handler(void)?/*這個(gè)函數(shù)在中斷文件stm32f10x_it.c里*/
{
???Delay_Led++;
???if(Delay_Key)???Delay_Key--;
???
評(píng)論
共有 條評(píng)論