欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
基于stm32f103的跑馬燈源代碼
[打印本頁]
作者:
pshh0420
時間:
2018-4-12 20:47
標題:
基于stm32f103的跑馬燈源代碼
開發板是stm32f103
代碼不是原創,純分享
大家一起學習
單片機源程序如下:
#include "led.h"
#include "delay.h"
#include "sys.h"
int main(void)
{
delay_init(); //延時函數初始化
LED_Init(); //初始化與LED連接的硬件接口
while(1)
{
GPIO_ResetBits(GPIOA,GPIO_Pin_8); //LED0輸出低
GPIO_SetBits(GPIOD,GPIO_Pin_2);//LED1輸出高
delay_ms(300);
GPIO_SetBits(GPIOA,GPIO_Pin_8); //LED0輸出低
GPIO_SetBits(GPIOD,GPIO_Pin_2);//LED1輸出高
delay_ms(300);
GPIO_ResetBits(GPIOA,GPIO_Pin_8); //LED0輸出低
GPIO_SetBits(GPIOD,GPIO_Pin_2);//LED1輸出高
delay_ms(300);
GPIO_SetBits(GPIOA,GPIO_Pin_8); //LED0輸出低
GPIO_SetBits(GPIOD,GPIO_Pin_2);//LED1輸出高
delay_ms(300);
GPIO_SetBits(GPIOA,GPIO_Pin_8);//LED0輸出高
GPIO_ResetBits(GPIOD,GPIO_Pin_2);//LED1輸出低
delay_ms(300);
GPIO_SetBits(GPIOA,GPIO_Pin_8); //LED0輸出低
GPIO_SetBits(GPIOD,GPIO_Pin_2);//LED1輸出高
delay_ms(300);
GPIO_SetBits(GPIOA,GPIO_Pin_8);//LED0輸出高
GPIO_ResetBits(GPIOD,GPIO_Pin_2);//LED1輸出低
delay_ms(300);
GPIO_SetBits(GPIOA,GPIO_Pin_8); //LED0輸出低
GPIO_SetBits(GPIOD,GPIO_Pin_2);//LED1輸出高
delay_ms(300);
}
}
復制代碼
所有資料51hei提供下載:
跑馬燈.rar
(273.12 KB, 下載次數: 22)
2018-4-13 01:29 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1