WISP ERT (Client)  1.0.0
The WISP Extended Runtime (WISP side)
crc16.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define ZERO_BIT_CRC   (0x1020) /* state of the CRC16 calculation after running a '0' */
 
#define ONE_BIT_CRC   (0x0001) /* state of the CRC16 calculation after running a '1' */
 
#define CRC_NO_PRELOAD   (0x0000) /* don't preload it, start with 0! */
 
#define CCITT_POLY   (0x1021)
 

Functions

uint16_t crc16_ccitt (uint16_t preload, uint8_t *dataPtr, uint16_t numBytes)
 
uint16_t crc16Bits_ccitt (uint16_t preload, uint8_t *dataPtr, uint16_t numBytes, uint16_t numBits)
 

Detailed Description

Interface to the Cyclic Redundancy Check module

Author
Ivar in 't Veen, Aaron Parks

Macro Definition Documentation

◆ CCITT_POLY

#define CCITT_POLY   (0x1021)

◆ CRC_NO_PRELOAD

#define CRC_NO_PRELOAD   (0x0000) /* don't preload it, start with 0! */

◆ ONE_BIT_CRC

#define ONE_BIT_CRC   (0x0001) /* state of the CRC16 calculation after running a '1' */

◆ ZERO_BIT_CRC

#define ZERO_BIT_CRC   (0x1020) /* state of the CRC16 calculation after running a '0' */

Function Documentation

◆ crc16_ccitt()

uint16_t crc16_ccitt ( uint16_t  preload,
uint8_t *  dataPtr,
uint16_t  numBytes 
)

◆ crc16Bits_ccitt()

uint16_t crc16Bits_ccitt ( uint16_t  preload,
uint8_t *  dataPtr,
uint16_t  numBytes,
uint16_t  numBits 
)