void ScanKey_Return()
{
static bit KeyPressFlag = 0;
static uchar KeyCnt = 0;
if (Key_Return == 0)
{
KeyPressFlag = 1; //按键按下标志
}
if (KeyPressFlag)
{
KeyCnt++; //延时计数
if (KeyCnt > DELAY_NUM && Key_Return) //上升沿
{
KeyCnt = 0;
KeyPressFlag = 0;
Key_Return_Flag = 1;
}
}
}