blob: d590765106f3d226449ccf5228181baef53c4c17 [file] [log] [blame]
Jan Nikitenkoad241522007-07-17 04:04:03 -07001#ifndef _LINUX_CRC7_H
2#define _LINUX_CRC7_H
3#include <linux/types.h>
4
George Spelvin1836eea2014-05-10 10:32:57 -04005extern const u8 crc7_be_syndrome_table[256];
Jan Nikitenkoad241522007-07-17 04:04:03 -07006
George Spelvin1836eea2014-05-10 10:32:57 -04007static inline u8 crc7_be_byte(u8 crc, u8 data)
Jan Nikitenkoad241522007-07-17 04:04:03 -07008{
George Spelvin1836eea2014-05-10 10:32:57 -04009 return crc7_be_syndrome_table[crc ^ data];
Jan Nikitenkoad241522007-07-17 04:04:03 -070010}
11
George Spelvin1836eea2014-05-10 10:32:57 -040012extern u8 crc7_be(u8 crc, const u8 *buffer, size_t len);
Jan Nikitenkoad241522007-07-17 04:04:03 -070013
14#endif