//crc 之前数据,数据长度
unsigned short CRC16(unsigned char const *buf, unsigned int len)
{
unsigned short Crc=0xffff;
int i;
for(i=0; i {
Crc = ((Crc >> 8) & 0xFF) ^ CRC16Table [(Crc^ *buf++) & 0xFF];
}return Crc;
}
添加回答
举报
0/150
提交
取消