Warning[Pe940]: missing return statement at end of non-void function "keyscan" H:\C\按键扫描\main.c 32
为什么??
uchar keyscan(void)
{
uchar i;
uchar keyvalue;
uchar keyvalue1;
uchar keyvalue2;
uchar outdata[4]={0x7f,0xbf,0xdf,0xef};
for(i=0;i<4;i++)
{
P1OUT=outdata[i];
if(P1IN|0XF0!=0XFF)
{
keyvalue1=P1IN&0X0F;
keyvalue2=P1OUT&0XF0;
keyvalue=keyvalue1+keyvalue2;
return keyvalue;
}
else
{
keyvalue=0XFF;
return keyvalue;
}
}
} |