crc library used in layer 2 and layer 3 implementation
crc.h@0:70b7787124e0, 2016-07-12 (annotated)
- Committer:
- rba90
- Date:
- Tue Jul 12 13:10:24 2016 +0000
- Revision:
- 0:70b7787124e0
init;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rba90 | 0:70b7787124e0 | 1 | #ifndef crc_h_ |
rba90 | 0:70b7787124e0 | 2 | #define crc_h_ |
rba90 | 0:70b7787124e0 | 3 | |
rba90 | 0:70b7787124e0 | 4 | #include <stdint.h> |
rba90 | 0:70b7787124e0 | 5 | |
rba90 | 0:70b7787124e0 | 6 | // x^8 + x^2 + x + 1 polynomial |
rba90 | 0:70b7787124e0 | 7 | #define CRC8_GEN 0x1070 |
rba90 | 0:70b7787124e0 | 8 | |
rba90 | 0:70b7787124e0 | 9 | uint8_t crc8(const uint8_t *data, int len); |
rba90 | 0:70b7787124e0 | 10 | |
rba90 | 0:70b7787124e0 | 11 | #endif |