新手入门
- 积分
- 14
- 金钱
- 14
- 注册时间
- 2019-7-12
- 在线时间
- 2 小时
|

楼主 |
发表于 2019-7-15 19:45:38
|
显示全部楼层
#include "sys.h"
#include "delay.h"
#include "usart.h"
#include "led.h"
//ALIENTEK ì½Ë÷ÕßSTM32F407¿a·¢°å êμÑé1
//ÅüÂíμÆêμÑé -¿aoˉêy°æ±¾
//¼¼êõÖ§3Ö£owww.openedv.com
//ìÔ±|μêÆì£ohttp://eboard.taobao.com
//1ãÖYêDDÇòíμç×ó¿Æ¼¼óDÏT1«Ë¾
//×÷ÕߣoÕyμãÔ-×ó @ALIENTEK
int main(void)
{
delay_init(168); //3õê¼»ˉÑóê±oˉêy
LED_Init(); //3õê¼»ˉLED¶Ë¿ú
/**ÏÂÃæêÇí¨1yÖ±½ó2ù×÷¿aoˉêyμÄ·½ê½êμÏÖIO¿ØÖÆ**/
while(1)
{
GPIO_ResetBits(GPIOF,GPIO_Pin_9); //LED0¶Ôó|òy½ÅGPIOF.9à-μí£¬áá μèí¬LED0=0;
GPIO_SetBits(GPIOF,GPIO_Pin_10); //LED1¶Ôó|òy½ÅGPIOF.10à-¸ß£¬Ãe μèí¬LED1=1;
delay_ms(500); //Ñóê±300ms
GPIO_SetBits(GPIOF,GPIO_Pin_9); //LED0¶Ôó|òy½ÅGPIOF.0à-¸ß£¬Ãe μèí¬LED0=1;
GPIO_ResetBits(GPIOF,GPIO_Pin_10); //LED1¶Ôó|òy½ÅGPIOF.10à-μí£¬áá μèí¬LED1=0;
delay_ms(500); //Ñóê±300ms
}
}
|
|