int main(void)
{
led_gpio_conf();// 来到这里的时候,系统的时钟已经被配置成72M。
LED_P0(OFF);
LED_P1(OFF);
LED_P5(OFF);
while(1)
{
//LED_P0(OFF);
//LED_P1(OFF);
//LED_P5(OFF);
Delay(0xdFFFFF);
LED_P0(ON);
LED_P1(OFF);
LED_P5(OFF);
Delay(0xdFFFFF);
LED_P0(OFF);
LED_P1(ON);
LED_P5(OFF);
Delay(0xdFFFFF);
LED_P0(OFF);
LED_P1(OFF);
LED_P5(ON);
}
}
1.以上红色部分三句话放到while循环里面,流水灯为什么会有问题?
2.while循环体里面,在点亮P0灯的同时,为什么还要关掉 LED_P1(OFF), LED_P5(OFF),如果不关掉流水灯有问题,但是在进这个while之前不是已经将三个灯都关掉了吗 |