📄 main.c
字号:
void Delay(int time)
{
int i;
int delayLoopCount=400;
for(;time>0;time--)
for(i=0;i<delayLoopCount;i++);
}
void main(void)
{
while(1) {
Led_Display(0x01); //点亮第1个LED
Delay(2000);
Led_Display(0x02); //点亮第2个LED
Delay(2000);
Led_Display(0x04); //点亮第3个LED
Delay(2000);
Led_Display(0x00); //关闭所有灯
Delay(2000);
Beep(1);
Led_Display(0x04);
Delay(2000);
Led_Display(0x02);
Delay(2000);
Led_Display(0x01);
Delay(2000);
Led_Display(0x00);
Delay(2000);
Beep(0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -