我想在中断0 工作5秒后led灯熄灭。如何加入代码?
//-----(没有按键按下灯处于熄灭状态)-----
while(1)
{
P1 =0xff;
}
}
//中断0(低)左右4只LED交替闪烁
void int0(void) interrupt 0 using 0
{
while(1)
{
P1 = 0x0f;
Delay_ms(500);
P1 = 0xf0;
Delay_ms(500);
}
}
//中断1(高)LED闪烁3次
void int1(void) interrupt 2 using 1
{
uint m;
for(m=0;m<3;m++)
{
P1 = 0xff;
Delay_ms(500);
P1 = 0;
Delay_ms(500);
}
}
```