unsignedchar*data;unsignedchar length;unsignedintcrc_chk(unsignedchar*data,unsignedchar length){int i,j;unsignedint crc_reg=0xffff;while(length--){ crc_reg^=*data++;for(j=0;j