X-Git-Url: http://git.jankratochvil.net/?p=gnokii.git;a=blobdiff_plain;f=Docs%2Fdevelopers%2Fother%2Fsniffs%2Firda%2Ftools%2Ffcs%2Ffcs.h;fp=Docs%2Fdevelopers%2Fother%2Fsniffs%2Firda%2Ftools%2Ffcs%2Ffcs.h;h=721be89a936a326c05a8352a6ba404105ec2d808;hp=0000000000000000000000000000000000000000;hb=2e0972b02d101bb0d8e9d3e15d2ac80def491a63;hpb=cc37b87508c91b5d4f21fd4bbc298104ae7de1dc diff --git a/Docs/developers/other/sniffs/irda/tools/fcs/fcs.h b/Docs/developers/other/sniffs/irda/tools/fcs/fcs.h new file mode 100644 index 0000000..721be89 --- /dev/null +++ b/Docs/developers/other/sniffs/irda/tools/fcs/fcs.h @@ -0,0 +1,30 @@ +/********************************************************************* + * + * Filename: fcs.h + * Version: + * Description: fcs routines for irda + * Status: Experimental. + * Author: Dag Brattli + * Created at: Mon Aug 4 20:40:53 1997 + * Modified at: Sat Jul 17 08:43:59 1999 + * Modified by: Thomas Schneider + * Sources: crc.h by Dag Brattli in + * linux-irda-project + * + ********************************************************************/ + +#ifndef FCS_H +#define FCS_H + +#include + +#define INIT_FCS 0xffff /* Initial FCS value */ +#define GOOD_FCS 0xf0b8 /* Good final FCS value */ + +#define IR_FCS(fcs, byte)((fcs >> 8)^irda_fcs16_table[ (fcs^byte) & 0xff]) + +unsigned short fcs_calc( __u16 oldfcs, __u8 *buf, int len); + +extern __u16 irda_fcs16_table[]; + +#endif