]>
Commit | Line | Data |
---|---|---|
cf48eb9a WD |
1 | /* |
2 | *========================================================================== | |
3 | * | |
4 | * crc.h | |
5 | * | |
6 | * Interface for the CRC algorithms. | |
7 | * | |
8 | *========================================================================== | |
e85427fd | 9 | * SPDX-License-Identifier: eCos-2.0 |
cf48eb9a WD |
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 | */ | |
f2841d37 MK |
25 | |
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 | ||
ecb57f69 | 39 | /* 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */ |
f2841d37 | 40 | |
ecb57f69 | 41 | uint16_t crc16_ccitt(uint16_t crc_start, unsigned char *s, int len); |
f2841d37 | 42 | |
cf48eb9a | 43 | #endif /* _SERVICES_CRC_CRC_H_ */ |