📄 lib_crc.doc
字号:
File : lib_crc.doc
Date : 1999-02-21
Author : Lammert Bies
E-mail : info@lammertbies.nl
Version : 1.01
Contents : Documentation for the CRC functions in lib_crc.c
The file lib_crc.c contains source code for functions to calculate
the three most used CRC values: CRC-16, CRC-32 and CRC-CCITT. The
functions can be freely used.
To calculate a CRC, the following three steps must be followed:
1. Initialize the CRC value. For CRC-16 and CRC-CCITT, the initial
value of the CRC is 0. CRC-32 starts with an initial value
of 0xffffffffL.
2. For each byte of the data starting with the first byte, call the
function update_crc_16(), update_crc_32() or update_crc_ccitt()
to recalculate the value of the CRC.
3. Only for CRC-32: When all bytes have been processed, take the
one's complement of the obtained CRC value.
An example of this calculation process can be found in the tst_crc.c
sample program.
The newest version of these files can be found at:
http://www.lammertbies.nl/comm/software/download/lib_crc.zip
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -