void ScanMatrixKeyFunc(void)
{
u8 key=0;
key=KEY_Matrix_Scan();
switch(key)
{
case 1: break;//??????
case 2:if(Snake.H != 2){KeyDir = 1;}break;
case 3:break;
case 4:break;
case 5:if(Snake.H != 4){KeyDir = 3;}break;
case 6:break;
case 7:if(Snake.H != 3){KeyDir = 4;}break;
case 8:break;
case 9: break;
case 10:if(Snake.H != 1){KeyDir = 2;}break;
case 11:break;
case 12:break;
case 13:break;
case 14:break;
case 15:break;
case 16:break;
}
}
这个对了一下没有问题!
04-01
2209
09-21