?? dydisp.h
字號:
#ifndef __dydisp_H__
#define __dydisp_H__
void move(uchar wd[])
{
uchar k;
for(k=7;k>0;k--)
{wd[k]=wd[k-1];}
}
void mov(uchar wd[],uchar pw[])
{
uchar k;
for(k=0;k<8;k++)
{wd[k]=pw[k];}
}
uchar scdisp()
{
esc=0;alter=0;save=0;
num=keyscan();
if(num<10)
{
temp2[count]=num;
move(temp1);
temp1[0]=num;
num =16;
count++;
}
return count;
}
/*刪除鍵處理函數(shù) 查詢刪除標志位*/
void delete()
{
uchar k;
if(del==1)
{
del=0;
if(count>0)
{
count--;
for(k=0;k<count;k++)
{
temp1[k]=temp1[k+1];
}
if(count==0)
{
P0=leddisp[16];
P2=0x80;
}
temp2[count]=0;
}
if(count==0)
{
temp2[0]=0;
temp1[0]=0;
}
}
}
/*-----密碼輸入動態(tài)顯示------*/
void dydisp()
{
ok=1;er=1;
mov(temp2,fill);
while(1)
{
int k;
int n=0x80;
count=scdisp();
delete();
for(k=0;k<count;k++)
{
P2=~n;
P0=leddisp[temp1[k]];
delay(3);
n=n>>1;
}
num=keyscan();
if(ent==1||esc==1){ent=0;count=0; break;}
}
}
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -