display() //数码管扫描
{
uchar num;
num=keyscan4x4(); // 'keyscan4x4': missing function-prototype
.................
P0=lab[num];
}
uchar keyscan4x4() //键盘扫描
{ //'keyscan4x4': redefinition
uchar key;
key=4; //key的值应该是检测键盘确认的,为方便观看直接赋值
return key;
} //'keyscan4x4': redefinition
main()
{
............
while(1)
{
keyscan();
}
}
void T0() interrupt 1 //中断
{
....................
display();
}
想要实现主程序循环检测键盘,定时50ms扫描数码管,编译过程显示红色标记部分有问题,错误描述如上,是什么原因呢? |