3
* Functions and types for CRC checks.
5
* Generated on Wed Nov 7 16:14:52 2012,
6
* by pycrc v0.7.11, 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 uint32_t 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
static inline crc_t crc_init(void)
63
* Update the crc value with new data.
65
* \param crc The current crc value.
66
* \param data Pointer to a buffer of \a data_len bytes.
67
* \param data_len Number of bytes in the \a data buffer.
68
* \return The updated crc value.
69
*****************************************************************************/
70
crc_t crc_update(crc_t crc, const unsigned char *data, size_t data_len);
74
* Calculate the final crc value.
76
* \param crc The current crc value.
77
* \return The final crc value.
78
*****************************************************************************/
79
static inline crc_t crc_finalize(crc_t crc)
81
return crc ^ 0xffffffff;
86
} /* closing brace for extern "C" */
89
#endif /* __CRC32C_H__ */