[an error occurred while processing this directive]
|
unsigned int CalcCRC16(char *buf, char Len)
{
unsigned char crc16h, crc16l, c;
crc16h=0; crc16l=0;
while (Len--)
{
c=*buf++;
c^=crc16h;
c^=(c >> 4);
crc16h=crc16l^(c<<4)^(c>>3);
crc16l=c^(c<<5);
}
return ((unsigned int)crc16h<<8)|crc16l;
}
Составить ответ ||| Конференция ||| Архив
Ответы
E-mail: info@telesys.ru