CANopenNode
crc16-ccitt.h
Go to the documentation of this file.
1 
27 #ifndef CRC16_CCITT_H
28 #define CRC16_CCITT_H
29 
30 #include "301/CO_driver.h"
31 
32 /* default configuration, see CO_config.h */
33 #ifndef CO_CONFIG_CRC16
34 #define CO_CONFIG_CRC16 (0)
35 #endif
36 
37 #if ((CO_CONFIG_CRC16) & CO_CONFIG_CRC16_ENABLE) || defined CO_DOXYGEN
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
66 void crc16_ccitt_single(uint16_t *crc, const uint8_t chr);
67 
68 
79 uint16_t crc16_ccitt(const uint8_t block[],
80  size_t blockLength,
81  uint16_t crc);
82 
83  /* CO_crc16_ccitt */
85 
86 #ifdef __cplusplus
87 }
88 #endif /*__cplusplus*/
89 
90 #endif /* (CO_CONFIG_CRC16) & CO_CONFIG_CRC16_ENABLE */
91 
92 #endif /* CRC16_CCITT_H */
CO_driver.h
Interface between CAN hardware and CANopenNode.
crc16_ccitt
uint16_t crc16_ccitt(const uint8_t block[], size_t blockLength, uint16_t crc)
Calculate CRC sum on block of data.
uint16_t
unsigned int uint16_t
UNSIGNED16 in CANopen (0006h), 16-bit unsigned integer.
Definition: CO_driver.h:153
crc16_ccitt_single
void crc16_ccitt_single(uint16_t *crc, const uint8_t chr)
Update crc16_ccitt variable with one data byte.
uint8_t
unsigned char uint8_t
UNSIGNED8 in CANopen (0005h), 8-bit unsigned integer.
Definition: CO_driver.h:151