crc16_ccitt.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
30 #ifndef CHECKSUM_CRC16_CCITT_H
31 #define CHECKSUM_CRC16_CCITT_H
32 
33 #include <stdint.h>
34 #include <stdlib.h>
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
52 uint16_t crc16_ccitt_update(uint16_t crc, const unsigned char *buf, size_t len);
53 
62 uint16_t crc16_ccitt_calc(const unsigned char *buf, size_t len);
63 
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif /* CHECKSUM_CRC16_CCITT_H */
70 
crc16_ccitt_update
uint16_t crc16_ccitt_update(uint16_t crc, const unsigned char *buf, size_t len)
Update CRC16-CCITT.
crc16_ccitt_calc
uint16_t crc16_ccitt_calc(const unsigned char *buf, size_t len)
Calculate CRC16-CCITT.