void Status_Refresh(void)
{
if(Locked) //上锁状态
{
LCD1602_I2C_DISPLAY_STRING(1," Locked "); //上锁时 显示Locked ,Psw or Fpt等待输入密码解锁
LCD1602_I2C_DISPLAY_STRING(2," Psw or Fpt ");
LOCK_ON;
LED_OFF;
}
else //开锁状态
{
LCD1602_I2C_DISPLAY_STRING(1,"Already Unlocked"); //开锁时 显示AlreadyUnlcoked, WELCOME
LCD1602_I2C_DISPLAY_STRING(2," WELCOME! :) ");
Unlock_7s(); //开锁7秒,再上锁
LED_ON ;
delay_ms(20);
Locked = 1;
Fpt_Pass = 0; // 清除进入方式标记
Psw_Pass = 0;
}
} |