-#define CRC16 0x1021 /* Generator polynomial (X^16 + X^12 + X^5 + 1) */
-
-
-/* Call this to init the fast CRC-16 calculation table. */
-
-static short crctab(u8 val) {
- int i;
- unsigned int crc;
-
- crc = val << 8;
-
- for (i = 0; i < 8; ++i)
- {
- crc <<= 1;
-
- if (crc & 0x10000)
- crc ^= CRC16;
- }
-
- return crc;
-}
-