xref: /openbmc/libmctp/crc-16-ccitt.h (revision b3de343e)
1*b3de343eSJohn Chung /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
2*b3de343eSJohn Chung 
3*b3de343eSJohn Chung #ifndef _CRC_16_CCITT_H
4*b3de343eSJohn Chung #define _CRC_16_CCITT_H
5*b3de343eSJohn Chung 
6*b3de343eSJohn Chung #include <stdint.h>
7*b3de343eSJohn Chung 
8*b3de343eSJohn Chung #define FCS_INIT_16 0xFFFF /* Initial FCS value */
9*b3de343eSJohn Chung 
10*b3de343eSJohn Chung uint16_t crc_16_ccitt(uint16_t fcs, const uint8_t *cp, uint32_t len);
11*b3de343eSJohn Chung 
12*b3de343eSJohn Chung uint16_t crc_16_ccitt_byte(uint16_t fcs, const uint8_t c);
13*b3de343eSJohn Chung 
14*b3de343eSJohn Chung #endif
15