16 #define CRC_16_CCITT 0x11021ul //x^16+x^12+x^5+1
17 #define CRC_XOR_PATTERN (CRC_16_CCITT << 8)
18 #define CRC_CARRY_BIT (0x01000000)
25 uint32_t crcwk = crc << 8;
27 for (ibyte = 0; ibyte < nbytes; ibyte++) {
29 for (ibit = 0; ibit < CHAR_BIT; ibit++) {
36 return (uint16_t)(crcwk >> 8);