crc16.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * \file stdout
  3. * Functions and types for CRC checks.
  4. *
  5. * Generated on Tue Jun 30 23:02:56 2009,
  6. * by pycrc v0.7.1, http://www.tty1.net/pycrc/
  7. * using the configuration:
  8. * Width = 16
  9. * Poly = 0x8005
  10. * XorIn = 0x0000
  11. * ReflectIn = True
  12. * XorOut = 0x0000
  13. * ReflectOut = True
  14. * Algorithm = bit-by-bit-fast
  15. * Direct = True
  16. *****************************************************************************/
  17. #ifndef __STDOUT__
  18. #define __STDOUT__
  19. #include <stdint.h>
  20. #include <stdlib.h>
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /**
  25. * The definition of the used algorithm.
  26. *****************************************************************************/
  27. #define CRC_ALGO_BIT_BY_BIT_FAST 1
  28. /**
  29. * Update the crc value with new data.
  30. *
  31. * \param crc The current crc value.
  32. * \param data Pointer to a buffer of \a data_len bytes.
  33. * \param data_len Number of bytes in the \a data buffer.
  34. * \return The updated crc value.
  35. *****************************************************************************/
  36. uint16_t crc16_update( uint16_t crc, const unsigned char data );
  37. #ifdef __cplusplus
  38. } /* closing brace for extern "C" */
  39. #endif
  40. #endif /* __STDOUT__ */