|
Functions | |
| u16 | crc16_ccitt (const u8 *buf, u32 len, u16 crc) |
| u32 | crc24q (const u8 *buf, u32 len, u32 crc) |
Variables | |
| static const u16 | crc16tab [256] |
| static const u32 | crc24qtab [256] |
Cyclic redundancy checks.
| u16 crc16_ccitt | ( | const u8 * | buf, |
| u32 | len, | ||
| u16 | crc | ||
| ) |
Calculate CCITT 16-bit Cyclical Redundancy Check (CRC16).
This implementation uses parameters used by XMODEM i.e. polynomial is:
Mask 0x11021, not reversed, not XOR'd (there are several slight variants on the CCITT CRC-16).
| buf | Array of data to calculate CRC for |
| len | Length of data array |
| crc | Initial CRC value |