crc16.h

来自「这是一个非常有价值的参考代码」· C头文件 代码 · 共 26 行

H
26
字号
#ifndef CRC16_H#define CRC16_H/* * Derived from CRC algorithm for JTAG ICE mkII, published in Atmel * Appnote AVR067.  Converted from C++ to C. */extern unsigned short crcsum(const unsigned char* message,			     unsigned long length,			     unsigned short crc);/* * Verify that the last two bytes is a (LSB first) valid CRC of the * message. */extern int crcverify(const unsigned char* message,		     unsigned long length);/* * Append a two byte CRC (LSB first) to message.  length is size of * message excluding crc.  Space for the CRC bytes must be allocated * in advance! */extern void crcappend(unsigned char* message,		      unsigned long length);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?