1 /*********************************************************************
5 * Description: fcs routines for irda
6 * Status: Experimental.
7 * Author: Dag Brattli <dagb@cs.uit.no>
8 * Created at: Mon Aug 4 20:40:53 1997
9 * Modified at: Sat Jul 17 08:43:59 1999
10 * Modified by: Thomas Schneider <nok-trace-men@dev-thomynet.de>
11 * Sources: crc.h by Dag Brattli <dagb@cs.uit.no> in
14 ********************************************************************/
19 #include <linux/types.h>
21 #define INIT_FCS 0xffff /* Initial FCS value */
22 #define GOOD_FCS 0xf0b8 /* Good final FCS value */
24 #define IR_FCS(fcs, byte)((fcs >> 8)^irda_fcs16_table[ (fcs^byte) & 0xff])
26 unsigned short fcs_calc( __u16 oldfcs, __u8 *buf, int len);
28 extern __u16 irda_fcs16_table[];