异或和校验函数

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

posted @ 2024-03-01 09:07  不折不扣  阅读(19)  评论(0编辑  收藏  举报