AceCRC
0.4.1
Cyclic Redundancy Check (CRC) algorithms (e.g. crc16ccitt, crc32) programmatically converted from C99 code generated by pycrc (https://pycrc.org) to Arduino C++ using namespaces and PROGMEM flash memory.
|
#include <stdlib.h>
#include <stdint.h>
Go to the source code of this file.
Typedefs | |
typedef uint8_t | ace_crc::crc8_byte::crc_t |
The type of the CRC values. More... | |
Functions | |
crc_t | ace_crc::crc8_byte::crc_init (void) |
Calculate the initial crc value. More... | |
crc_t | ace_crc::crc8_byte::crc_update (crc_t crc, const void *data, size_t data_len) |
Update the crc value with new data. More... | |
crc_t | ace_crc::crc8_byte::crc_finalize (crc_t crc) |
Calculate the final crc value. More... | |
crc_t | ace_crc::crc8_byte::crc_calculate (const void *data, size_t data_len) |
Calculate the crc in one-shot. More... | |
Variables | |
const uint8_t | ace_crc::crc8_byte::CRC_ALGO_TABLE_DRIVEN = 1 |
The definition of the used algorithm. More... | |
Functions and types for CRC checks.
Generated on Thu Dec 10 09:53:46 2020 by pycrc v0.9.2, https://pycrc.org using the configuration:
This file defines the functions crc_init(), crc_update() and crc_finalize().
The crc_init() function returns the inital crc
value and must be called before the first call to crc_update(). Similarly, the crc_finalize() function must be called after the last call to crc_update(), before the crc
is being used. is being used.
The crc_update() function can be called any number of times (including zero times) in between the crc_init() and crc_finalize() calls.
This pseudo-code shows an example usage of the API:
Auto converted to Arduino C++ on Thu Dec 10 09:53:46 PST 2020 by AceCRC (https://github.com/bxparks/AceCRC). DO NOT EDIT
Definition in file crc8_byte.hpp.
typedef uint8_t ace_crc::crc8_byte::crc_t |
The type of the CRC values.
This type must be big enough to contain at least 8 bits.
Definition at line 68 of file crc8_byte.hpp.
|
inline |
Calculate the crc in one-shot.
This is a convenience function added by AceCRC.
[in] | data | Pointer to a buffer of data_len bytes. |
[in] | data_len | Number of bytes in the data buffer. |
Definition at line 112 of file crc8_byte.hpp.
|
inline |
Calculate the final crc value.
[in] | crc | The current crc value. |
Definition at line 99 of file crc8_byte.hpp.
|
inline |
Calculate the initial crc value.
Definition at line 76 of file crc8_byte.hpp.
crc_t ace_crc::crc8_byte::crc_update | ( | crc_t | crc, |
const void * | data, | ||
size_t | data_len | ||
) |
Update the crc value with new data.
[in] | crc | The current crc value. |
[in] | data | Pointer to a buffer of data_len bytes. |
[in] | data_len | Number of bytes in the data buffer. |
Definition at line 57 of file crc8_byte.cpp.
const uint8_t ace_crc::crc8_byte::CRC_ALGO_TABLE_DRIVEN = 1 |
The definition of the used algorithm.
This is not used anywhere in the generated code, but it may be used by the application code to call algorithm-specific code, if desired.
Definition at line 60 of file crc8_byte.hpp.