2006-04-16 08:51:58 +00:00
|
|
|
/*
|
|
|
|
*==========================================================================
|
|
|
|
*
|
|
|
|
* crc.h
|
|
|
|
*
|
|
|
|
* Interface for the CRC algorithms.
|
|
|
|
*
|
|
|
|
*==========================================================================
|
2013-07-08 10:11:35 +00:00
|
|
|
* SPDX-License-Identifier: eCos-2.0
|
2006-04-16 08:51:58 +00:00
|
|
|
*==========================================================================
|
|
|
|
*#####DESCRIPTIONBEGIN####
|
|
|
|
*
|
|
|
|
* Author(s): Andrew Lunn
|
|
|
|
* Contributors: Andrew Lunn
|
|
|
|
* Date: 2002-08-06
|
|
|
|
* Purpose:
|
|
|
|
* Description:
|
|
|
|
*
|
|
|
|
* This code is part of eCos (tm).
|
|
|
|
*
|
|
|
|
*####DESCRIPTIONEND####
|
|
|
|
*
|
|
|
|
*==========================================================================
|
|
|
|
*/
|
2006-03-30 11:40:55 +00:00
|
|
|
|
|
|
|
#ifndef _SERVICES_CRC_CRC_H_
|
|
|
|
#define _SERVICES_CRC_CRC_H_
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
#ifndef __externC
|
|
|
|
# ifdef __cplusplus
|
|
|
|
# define __externC extern "C"
|
|
|
|
# else
|
|
|
|
# define __externC extern
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2016-03-03 08:34:12 +00:00
|
|
|
/* 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */
|
2006-03-30 11:40:55 +00:00
|
|
|
|
2016-03-03 08:34:12 +00:00
|
|
|
uint16_t crc16_ccitt(uint16_t crc_start, unsigned char *s, int len);
|
2006-03-30 11:40:55 +00:00
|
|
|
|
2006-04-16 08:51:58 +00:00
|
|
|
#endif /* _SERVICES_CRC_CRC_H_ */
|