ucrc16.h¶
ucrc16 definitions
-
UCRC16_CCITT_POLY_BE
¶ Various generator polynomials.
1
(0x1021)
CRC16-CCITT polynomial (big-endian)
-
UCRC16_CCITT_POLY_LE
¶ CRC16-CCITT polynomial (little-endian)
1
(0x8408)
-
uint16_t
ucrc16_calc_be
(const uint8_t * buf,msp430_types.h::size_t
len, uint16_t poly, uint16_t seed)¶ Calculate CRC16 (big-endian version)
Parameters
buf: Start of memory are to checksum len: Number of bytes in buf
to calculate checksum forpoly: The generator polynomial for the checksum seed: The seed (starting value) for the checksum Note
The return value is not the complement of the sum but the sum itself
Return values
- Checksum of the specified memory area based on
seed
andpoly
- Checksum of the specified memory area based on
-
uint16_t
ucrc16_calc_le
(const uint8_t * buf,msp430_types.h::size_t
len, uint16_t poly, uint16_t seed)¶ Calculate CRC16 (little-endian version)
Parameters
buf: Start of memory are to checksum len: Number of bytes in buf
to calculate checksum forpoly: The generator polynomial for the checksum seed: The seed (starting value) for the checksum Note
The return value is not the complement of the sum but the sum itself
Return values
- Checksum of the specified memory area based on
seed
andpoly
- Checksum of the specified memory area based on