mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-16 10:41:07 +00:00
I forgot to add these files in the previous commit. They are
basically obtained from Atmel's appnote AVR067. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@452 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
25
crc16.h
Normal file
25
crc16.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user