From 57f0f512b273f60d52568b8c6b77e17f5636edc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Fabian=20Silva=20Delgado?= Date: Wed, 5 Aug 2015 17:04:01 -0300 Subject: Initial import --- include/linux/crc7.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 include/linux/crc7.h (limited to 'include/linux/crc7.h') diff --git a/include/linux/crc7.h b/include/linux/crc7.h new file mode 100644 index 000000000..d59076510 --- /dev/null +++ b/include/linux/crc7.h @@ -0,0 +1,14 @@ +#ifndef _LINUX_CRC7_H +#define _LINUX_CRC7_H +#include + +extern const u8 crc7_be_syndrome_table[256]; + +static inline u8 crc7_be_byte(u8 crc, u8 data) +{ + return crc7_be_syndrome_table[crc ^ data]; +} + +extern u8 crc7_be(u8 crc, const u8 *buffer, size_t len); + +#endif -- cgit v1.2.3