AceCRC
0.1
Cyclic Redundancy Check (CRC) algorithms (e.g. crc32(), crc16ccitt()) are progammatically converted from pycrc to Arduino C++, including variants (e.g. 4-bit versus 8-bit tables) that trade space and time.
src
ace_crc
crc16ccitt_bit.hpp
Go to the documentation of this file.
1
44
#ifndef ACE_CRC_CRC16CCITT_BIT_HPP
45
#define ACE_CRC_CRC16CCITT_BIT_HPP
46
47
#include <stdlib.h>
48
#include <stdint.h>
49
50
namespace
ace_crc {
51
namespace
crc16ccitt_bit {
52
53
60
static
const
uint8_t CRC_ALGO_BIT_BY_BIT_FAST = 1;
61
62
68
typedef
uint_fast16_t
crc_t
;
69
70
76
static
inline
crc_t
crc_init(
void
)
77
{
78
return
0x1d0f;
79
}
80
81
90
crc_t crc_update(crc_t crc,
const
void
*data,
size_t
data_len);
91
92
99
static
inline
crc_t crc_finalize(crc_t crc)
100
{
101
return
crc;
102
}
103
104
105
}
// crc16ccitt_bit
106
}
// ace_crc
107
108
#endif
/* ACE_CRC_CRC16CCITT_BIT_HPP */
ace_crc::crc16ccitt_bit::crc_t
uint_fast16_t crc_t
The type of the CRC values.
Definition:
crc16ccitt_bit.hpp:68
Generated by
1.8.17