异或和校验函数
/*************************************************
异或和校验函数
*************************************************/
unsigned char Check8(unsigned char *p, unsigned char counter)
{ unsigned char crc8 = 0;
for( ; counter > 0; counter--)
{
crc8 ^= *p;
p++;
}
return crc8;
}