void Key_Test(void) //测试
{
// uchar testnum=0;
IO2CLR|=ENABLE2;
CLR_CLK1;
Write4094(0xf0,LedTable[testnum],LedTable[testnum],0x00);
delay_us(10);
SET_CLK1;
if((IO0PIN&S4)==0)
{
delay_ms(10);
if((IO0PIN&S4)==0)
{
while(!(IO0PIN&S4));
testnum++;
if(testnum==16)testnum=0;
}
}
}
代码 |