Loading...
Searching...
No Matches
crc8.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2018 Gunar Schorcht
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
9#pragma once
10
23
24#include <stddef.h>
25#include <stdint.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
45uint8_t crc8(const uint8_t *data, size_t len, uint8_t poly, uint8_t seed);
46
61uint8_t crc8_lsb(const uint8_t *data, size_t len, uint8_t poly, uint8_t seed);
62
63#ifdef __cplusplus
64}
65#endif
66
uint8_t crc8_lsb(const uint8_t *data, size_t len, uint8_t poly, uint8_t seed)
Calculate a reflected CRC-8 (LSB first)
uint8_t crc8(const uint8_t *data, size_t len, uint8_t poly, uint8_t seed)
Calculate CRC-8 (MSB first)