![]() |
![]() |
TI-OpenThread
1.08.02.01
|
Functions and types for CRC checks.
Generated on Thu Nov 16 17:30:33 2017 by pycrc v0.9.1, 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:
#include <stdlib.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | CRC_ALGO_TABLE_DRIVEN 1 |
Typedefs | |
typedef uint8_t | crc_t |
Functions | |
static crc_t | crc_finalize (crc_t crc) |
static crc_t | crc_init (void) |
crc_t | crc_update (crc_t crc, const void *data, size_t data_len) |
#define 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.
typedef uint8_t crc_t |
The type of the CRC values.
This type must be big enough to contain at least 8 bits.
|
inlinestatic |
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. |
Referenced by crc_init().