Newland NLS-FM30 Series User Manual page 28

Fixed mount barcode scanner
Hide thumbs Also See for NLS-FM30 Series:
Table of Contents

Advertisement

unsigned int crc_cal_by_bit(unsigned char* ptr, unsigned int len)
{
unsigned int crc = 0;
while(len-- != 0)
{
for(unsigned char i = 0x80; i != 0; i /= 2)
{
crc *= 2;
if((crc&0x10000) !=0)
crc ^= 0x11021;
if((*ptr&i) != 0)
crc ^= 0x1021;
}
ptr++;
}
return crc;
}
20

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents