单片机源程序如下:
#include "stm32f10x_lib.h"
#include "led.h"
void delay( vu32 ncount);
int main(void)
{
LED_GPIO_Config();
while(1)
{
LED1(ON);
delay(0x02FFEF);
LED2(ON);
delay(0x02FFEF);
LED3(ON);
delay(0x02FFEF);
LED1(OFF);
delay(0x02FFEF);
LED2(OFF);
delay(0x02FFEF);
LED3(OFF);
delay(0x02FFEF);
}
}
void delay( vu32 ncount)
{
for(; ncount != 0; ncount--);
}
|