blob: 111cb4adb74403118db4ef6ebf263d94925c30f6 [file] [log] [blame]
Wolfgang Denkebd3deb2006-04-16 10:51:58 +02001/*
2 *==========================================================================
3 *
4 * crc.h
5 *
6 * Interface for the CRC algorithms.
7 *
8 *==========================================================================
Wolfgang Denkfb7f0062013-07-08 12:11:35 +02009 * SPDX-License-Identifier: eCos-2.0
Wolfgang Denkebd3deb2006-04-16 10:51:58 +020010 *==========================================================================
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 */
Markus Klotzbuecher387f5412006-03-30 13:40:55 +020025
26#ifndef _SERVICES_CRC_CRC_H_
27#define _SERVICES_CRC_CRC_H_
28
29#include <linux/types.h>
30
31#ifndef __externC
32# ifdef __cplusplus
33# define __externC extern "C"
34# else
35# define __externC extern
36# endif
37#endif
38
Stefan Roese084ff1e2016-03-03 09:34:12 +010039/* 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */
Markus Klotzbuecher387f5412006-03-30 13:40:55 +020040
Stefan Roese084ff1e2016-03-03 09:34:12 +010041uint16_t crc16_ccitt(uint16_t crc_start, unsigned char *s, int len);
Markus Klotzbuecher387f5412006-03-30 13:40:55 +020042
Wolfgang Denkebd3deb2006-04-16 10:51:58 +020043#endif /* _SERVICES_CRC_CRC_H_ */