#include "stm32f10x.h"
#include "led.h"
void delay(unsigned count);
int main()
{
while(1)
{
delay(0xFFFFF);
GPIO_SetBits(GPIO_PORT , GPIO_PIN);
delay(0xFFFFF);
LED_GPIO_ON();
}
}
void delay(unsigned count)
{
for(;count!=0;count--);
}
这个代码为啥不能实现连续闪烁?如果我把 LED_GPIO_ON();放在外面然后里面换成 GPIO_ResetBits(GPIO_PORT, GPIO_PIN);就可以 |