libsbp
v2.4.7
|
Cyclic redundancy checks. More...
Functions | |
u16 | crc16_ccitt (const u8 *buf, u32 len, u16 crc) |
Calculate CCITT 16-bit Cyclical Redundancy Check (CRC16). More... | |
Cyclic redundancy checks.
Calculate CCITT 16-bit Cyclical Redundancy Check (CRC16).
This implementation uses parameters used by XMODEM i.e. polynomial is:
\[ x^{16} + x^{12} + x^5 + 1 \]
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 |
Definition at line 74 of file edc.c.