//crc 之前數(shù)據(jù),數(shù)據(jù)長度
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
提交
取消