3
* Functions and types for CRC checks.
5
* Generated on Sun Oct 24 10:58:41 2010,
6
* by pycrc v0.7.6, http://www.tty1.net/pycrc/
7
* using the configuration:
14
* Algorithm = table-driven
15
*****************************************************************************/
28
* The definition of the used algorithm.
29
*****************************************************************************/
30
#define CRC_ALGO_TABLE_DRIVEN 1
34
* The type of the CRC values.
36
* This type must be big enough to contain at least 32 bits.
37
*****************************************************************************/
38
typedef unsigned long crc_t;
42
* Reflect all bits of a \a data word of \a data_len bytes.
44
* \param data The data word to be reflected.
45
* \param data_len The width of \a data expressed in number of bits.
46
* \return The reflected data.
47
*****************************************************************************/
48
crc_t crc_reflect(crc_t data, size_t data_len);
52
* Calculate the initial crc value.
54
* \return The initial crc value.
55
*****************************************************************************/
56
#define crc_init() (0xffffffff)
60
* Update the crc value with new data.
62
* \param crc The current crc value.
63
* \param data Pointer to a buffer of \a data_len bytes.
64
* \param data_len Number of bytes in the \a data buffer.
65
* \return The updated crc value.
66
*****************************************************************************/
67
crc_t crc_update(crc_t crc, const unsigned char *data, size_t data_len);
71
* Calculate the final crc value.
73
* \param crc The current crc value.
74
* \return The final crc value.
75
*****************************************************************************/
76
#define crc_finalize(crc) (crc ^ 0xffffffff)
80
} /* closing brace for extern "C" */
83
#endif /* __CRC_H__ */