Main Page | Class List | File List | Class Members | File Members

crc4.h

Go to the documentation of this file.
00001 #ifndef _CRC4_H_
00002 #define _CRC4_H_
00003 
00004 /*
00005  * crc4.h 
00006  * 
00007  * functions for 4-bit CRC calculations
00008  * assumes no more than 12 info. bits
00009  * Max Luttrell 8/19/96
00010  */
00011 
00012 #include "standard.h"
00013 #include "bits.h"
00014 
00015 unsigned int makecrc4(unsigned int b);
00016 /*
00017  * Takes b as input, which should be the information vector
00018  * already multiplied by x^4 (ie. shifted over 4 bits), and
00019  * returns the crc for this input based on the defined generator
00020  * polynomial GENPOLY
00021  */
00022 
00023 int checkcrc4(unsigned int b);
00024 /*
00025  * Takes b as input, and determines if it passes CRC check.
00026  * It does this by finding out if it is a multiple of GENPOLY.
00027  * Returns 1 if passes, 0 if fails.
00028  */
00029 
00030 #endif

Generated on Sun Jul 16 16:27:45 2006 by  doxygen 1.3.9.1