CRC-16/CCITT checksum utility. More...
#include "spp/core/types.h"Go to the source code of this file.
Macros | |
| #define | K_SPP_CRC_POLY (0x1021U) |
| CRC-16/CCITT polynomial (0x1021). | |
| #define | K_SPP_CRC_INIT (0xFFFFU) |
| CRC-16 initial value. | |
Functions | |
| spp_uint16_t | SPP_UTIL_crc16 (const spp_uint8_t *p_data, spp_uint32_t length) |
| Compute a CRC-16/CCITT checksum over a byte buffer. | |
CRC-16/CCITT checksum utility.
Naming conventions used in this file:
Definition in file crc.h.
| #define K_SPP_CRC_POLY (0x1021U) |
CRC-16/CCITT polynomial (0x1021).
Definition at line 20 of file crc.h.
Referenced by SPP_UTIL_crc16().
| #define K_SPP_CRC_INIT (0xFFFFU) |
| spp_uint16_t SPP_UTIL_crc16 | ( | const spp_uint8_t * | p_data, |
| spp_uint32_t | length ) |
Compute a CRC-16/CCITT checksum over a byte buffer.
| [in] | p_data | Pointer to the data buffer. |
| [in] | length | Number of bytes to process. |
Definition at line 8 of file crc.c.
References K_SPP_CRC_INIT, K_SPP_CRC_POLY, and SPP_UTIL_crc16().
Referenced by packetCrc(), and SPP_UTIL_crc16().