crc.h 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* SPDX-License-Identifier: eCos-2.0 */
  2. /*
  3. *==========================================================================
  4. *
  5. * crc.h
  6. *
  7. * Interface for the CRC algorithms.
  8. *
  9. *==========================================================================
  10. *==========================================================================
  11. *#####DESCRIPTIONBEGIN####
  12. *
  13. * Author(s): Andrew Lunn
  14. * Contributors: Andrew Lunn
  15. * Date: 2002-08-06
  16. * Purpose:
  17. * Description:
  18. *
  19. * This code is part of eCos (tm).
  20. *
  21. *####DESCRIPTIONEND####
  22. *
  23. *==========================================================================
  24. */
  25. #ifndef _SERVICES_CRC_CRC_H_
  26. #define _SERVICES_CRC_CRC_H_
  27. #include <linux/types.h>
  28. #ifndef __externC
  29. # ifdef __cplusplus
  30. # define __externC extern "C"
  31. # else
  32. # define __externC extern
  33. # endif
  34. #endif
  35. /* 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */
  36. uint16_t crc16_ccitt(uint16_t crc_start, unsigned char *s, int len);
  37. #endif /* _SERVICES_CRC_CRC_H_ */