1*ed6ce67aSThomas Chou #ifndef _LINUX_CRC7_H 2*ed6ce67aSThomas Chou #define _LINUX_CRC7_H 3*ed6ce67aSThomas Chou #include <linux/types.h> 4*ed6ce67aSThomas Chou 5*ed6ce67aSThomas Chou extern const u8 crc7_syndrome_table[256]; 6*ed6ce67aSThomas Chou crc7_byte(u8 crc,u8 data)7*ed6ce67aSThomas Choustatic inline u8 crc7_byte(u8 crc, u8 data) 8*ed6ce67aSThomas Chou { 9*ed6ce67aSThomas Chou return crc7_syndrome_table[(crc << 1) ^ data]; 10*ed6ce67aSThomas Chou } 11*ed6ce67aSThomas Chou 12*ed6ce67aSThomas Chou extern u8 crc7(u8 crc, const u8 *buffer, size_t len); 13*ed6ce67aSThomas Chou 14*ed6ce67aSThomas Chou #endif 15