diff --git a/crc/crc8.h b/crc/crc8.h new file mode 100644 index 0000000..3a88d71 --- /dev/null +++ b/crc/crc8.h @@ -0,0 +1,19 @@ +#ifndef _CRC_CRC8_H +#define _CRC_CRC8_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +// LSB-first +uint8_t crc8_lsb(const char *buf, int len); + +// MSB-first +uint8_t crc8_msb(const char *buf, int len); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif