unsigned short crc(unsigned char [] crc_pointer,unsigned short data_length)
{
unsigned short k,k0,bit_flag;
unsigned short int_crc=0xffff;
for (k=0;k<御搜data_length;k++)
{
int_crc^=(crc_pointer)[k];
for(k0=0;k0<8;k0++)
{
bit_flag=int_crc&0x0001;弯拆磨
int_crc>>埋斗=1;
if (bit_flag==1)
int_crc^=0xa001;
}
}
return(int_crc);
}