if((P6IN&0x02)==0) //p6.1=input {if(alarmflag==0) { P2OUT |=ptt3;//out=1 alarm ///////////////////// sendbuff[0]=0x01;// power on sendflag=0;//send data to next station sendlong=10; alarmflag=1; }
如果我去掉alarmflag 程序好像运行也可以 if((P6IN&0x02)==0) //p6.1=input { P2OUT |=ptt3;//out=1 alarm ///////////////////// sendbuff[0]=0x01;// power on sendflag=0;//send data to next station sendlong=10; }
|