unsigned int old,new,push,rel,temp; unsigned char i; void key(void){ for(i=0x10;i!=0;i<<1) P1=P1&i; P1=P1|0x0f; new=(new<<4)|((~P1)&0x0f); } if((temp=new^old)>0{ push=temp&new; release=temp&old; old=new; } } new新键值,old老的,P1.7-P1.4行,其余为列,1为低电平,0为高; new=(new<<4)|((~P1)&0x0f);这句怎么理解?
|