資源簡介
STM32時分法多任務處理例程
代碼片段和文件信息
#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)?/*這個函數在中斷文件stm32f10x_it.c里*/
{
???Delay_Led++;
???if(Delay_Key)???Delay_Key--;
???
- 上一篇:ov9650攝像頭在qt中的實現代碼
- 下一篇:STM32多任務處理例程2
評論
共有 條評論