crc library used in layer 2 and layer 3 implementation
Diff: crc.h
- Revision:
- 0:70b7787124e0
diff -r 000000000000 -r 70b7787124e0 crc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/crc.h Tue Jul 12 13:10:24 2016 +0000 @@ -0,0 +1,11 @@ +#ifndef crc_h_ +#define crc_h_ + +#include <stdint.h> + +// x^8 + x^2 + x + 1 polynomial +#define CRC8_GEN 0x1070 + +uint8_t crc8(const uint8_t *data, int len); + +#endif \ No newline at end of file