55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
/**
|
|
* \file stdout
|
|
* Functions and types for CRC checks.
|
|
*
|
|
* Generated on Tue Jun 30 23:02:56 2009,
|
|
* by pycrc v0.7.1, http://www.tty1.net/pycrc/
|
|
* using the configuration:
|
|
* Width = 16
|
|
* Poly = 0x8005
|
|
* XorIn = 0x0000
|
|
* ReflectIn = True
|
|
* XorOut = 0x0000
|
|
* ReflectOut = True
|
|
* Algorithm = bit-by-bit-fast
|
|
* Direct = True
|
|
*****************************************************************************/
|
|
#ifndef __STDOUT__
|
|
#define __STDOUT__
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* The definition of the used algorithm.
|
|
*****************************************************************************/
|
|
#define CRC_ALGO_BIT_BY_BIT_FAST 1
|
|
|
|
/**
|
|
* The type of the CRC values.
|
|
*
|
|
* This type must be big enough to contain at least 16 bits.
|
|
*****************************************************************************/
|
|
typedef uint16_t crc_t;
|
|
|
|
/**
|
|
* Update the crc value with new data.
|
|
*
|
|
* \param crc The current crc value.
|
|
* \param data Pointer to a buffer of \a data_len bytes.
|
|
* \param data_len Number of bytes in the \a data buffer.
|
|
* \return The updated crc value.
|
|
*****************************************************************************/
|
|
crc_t crc16_update(crc_t crc, const unsigned char *data, size_t data_len);
|
|
|
|
#ifdef __cplusplus
|
|
} /* closing brace for extern "C" */
|
|
#endif
|
|
|
|
#endif /* __STDOUT__ */
|
|
|