158
The CRC simple function is as follows: unsigned int crc_chek
value
(
unsigned char *data value, unsigned char length
)
{
unsigned int crc value=0xFFFF;
int i;
while
(
length--
)
{
crc_value^=*dat+;
for
(
i=0;i<8;i++
)
{
if
(
crc_value&0x0001
)
=
(
crc_value>>1
)
}
else
^0xa001;{ {
}
}
} crc_value=crc_value>>1;
}
return
(
crc_value
)
;
}