else if(count==4) //rbuf[3]
{
}
else if(count==5) //rbuf[4]
{
}
else if(count==6&&rbuf[5]==(rbuf[0]^rbuf[1]^rbuf[2]^rbuf[3]^rbuf[4])) //count=6 实际接收6个字节 0-5 rbuf[5]
{
count=0 ;
uart1_flag=rbuf[3];
ES=0;
}
else if(count==7&&(rbuf[6]==(rbuf[0]^rbuf[1]^rbuf[2]^rbuf[3]^rbuf[4]^rbuf[5]))) //count=7 实际接收7个字节 0-6
{
count=0 ;
uart1_flag=rbuf[3];
ES=0;
}
else if(count==8&&(rbuf[7]==(rbuf[0]^rbuf[1]^rbuf[2]^rbuf[3]^rbuf[4]^rbuf[5]^rbuf[6]))) //count=7 实际接收7个字节 0-6
{
count=0 ;
uart1_flag=rbuf[3];
ES=0;
}
// else if(count>8&&count<45) //6-42 count=45时 rbuf[44]还未收到数据,必须当count=45 [0-44]
// {
// }
// else if(count==45) //0-44 count=45时 rbuf[44]还未收到数据,必须当count=45 [0-44]
// {
// receive1_xorg=0;
// count=0;
// for (n=0;n<44;n++) //0-43
// {
// receive1_xorg^= rbuf[n] ;
// }
// if(rbuf[44]==receive1_xorg) //通讯模块采集数据
// {
// uart1_flag=rbuf[3];
// ES=0;
// }
// }
else if(count>8)
{
count=0;
}
}
}后面还有一堆,不明白意思