欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
簡約的矩陣鍵盤算法
[打印本頁]
作者:
liuqq
時間:
2015-5-21 23:40
標題:
簡約的矩陣鍵盤算法
#include<reg52.h>
#include<intrins.h>
#include"delay.h"
unsigned char keyscan()
{
unsigned char i,j,key_value=0xff;
P1=0X0F;
if((P1&0x0f)==0x0f)return 0xff;
else
{
delay_nms(5);
if((P1&0X0F)==0x0f)return 0xff;
else
{
for(i=4;i<8;i++)
{
P1=~(1<<i)|0x0f;
for(j=0;j<4;j++)
{
if((P1&(1<<j))==0)
key_value=(i-4)*4+j;
}
}
return key_value;
}
}
}
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1