CANopenNode
CANopen protocol stack
Loading...
Searching...
No Matches
crc16-ccitt.h
Go to the documentation of this file.
1
22#ifndef CRC16_CCITT_H
23#define CRC16_CCITT_H
24
25#include "301/CO_driver.h"
26
27/* default configuration, see CO_config.h */
28#ifndef CO_CONFIG_CRC16
29#define CO_CONFIG_CRC16 (0)
30#endif
31
32#if (((CO_CONFIG_CRC16)&CO_CONFIG_CRC16_ENABLE) != 0) || defined CO_DOXYGEN
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
58void crc16_ccitt_single(uint16_t* crc, const uint8_t chr);
59
70uint16_t crc16_ccitt(const uint8_t block[], size_t blockLength, uint16_t crc);
71
72 /* CO_crc16_ccitt */
73
74#ifdef __cplusplus
75}
76#endif /* __cplusplus */
77
78#endif /* (CO_CONFIG_CRC16) & CO_CONFIG_CRC16_ENABLE */
79
80#endif /* CRC16_CCITT_H */
Interface between CAN hardware and CANopenNode.
uint16_t crc16_ccitt(const uint8_t block[], size_t blockLength, uint16_t crc)
Calculate CRC sum on block of data.
void crc16_ccitt_single(uint16_t *crc, const uint8_t chr)
Update crc16_ccitt variable with one data byte.
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition CO_driver.h:132
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition CO_driver.h:131