crc/crc16ccitt_false.h
Go to the documentation of this file.
1 /*
2  * CRC checksums implemented by https://github.com/madler/crcany
3  * Sources under the zlib license, permitting free commercial use.
4  * See https://github.com/madler/crcany and http://zlib.net/zlib_license.html
5  * for further details.
6  *
7  * This project uses algorithm "CRC-16/CCITT-FALSE" (crc16ccitt_false.c and crc16ccitt_false.h).
8  * Other crc checksum algorithms may be used if required.
9  */
10 
11 // The _bit, _byte, and _word routines return the CRC of the len bytes at mem,
12 // applied to the previous CRC value, crc. If mem is NULL, then the other
13 // arguments are ignored, and the initial CRC, i.e. the CRC of zero bytes, is
14 // returned. Those routines will all return the same result, differing only in
15 // speed and code complexity. The _rem routine returns the CRC of the remaining
16 // bits in the last byte, for when the number of bits in the message is not a
17 // multiple of eight. The high bits bits of the low byte of val are applied to
18 // crc. bits must be in 0..8.
19 
20 #include <stddef.h>
21 
22 // Compute the CRC a bit at a time.
23 unsigned crc16ccitt_false_bit(unsigned crc, void const *mem, size_t len);
24 
25 // Compute the CRC of the high bits bits in the low byte of val.
26 unsigned crc16ccitt_false_rem(unsigned crc, unsigned val, unsigned bits);
27 
28 // Compute the CRC a byte at a time.
29 unsigned crc16ccitt_false_byte(unsigned crc, void const *mem, size_t len);
30 
31 // Compute the CRC a word at a time.
32 unsigned crc16ccitt_false_word(unsigned crc, void const *mem, size_t len);
crc16ccitt_false_bit
unsigned crc16ccitt_false_bit(unsigned crc, void const *mem, size_t len)
Definition: crc16ccitt_false.cpp:16
crc16ccitt_false_rem
unsigned crc16ccitt_false_rem(unsigned crc, unsigned val, unsigned bits)
Definition: crc16ccitt_false.cpp:29
crc16ccitt_false_byte
unsigned crc16ccitt_false_byte(unsigned crc, void const *mem, size_t len)
Definition: crc16ccitt_false.cpp:278
crc16ccitt_false_word
unsigned crc16ccitt_false_word(unsigned crc, void const *mem, size_t len)
Definition: crc16ccitt_false.cpp:297


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Thu Sep 8 2022 02:30:19