|
|
◆ calculate_crc32()
| uint32_t calculate_crc32 |
( |
uint8_t * |
buffer, |
|
|
uint8_t |
number_bytes, |
|
|
uint8_t |
mode |
|
) |
| |
Calculates the CRC value for a given buffer. Depending on the mode it can perform a complete calculation or specific parts of it, in case of a splitted CRC calculation. The generator polynom is specified in the corresponding header file crc.h.
- Parameters
-
| [in] | buffer | input data buffer |
| [in] | number_bytes | number of bytes in buffer (buffer length) |
| [in] | mode | specifies the mode of operation:
CRC_INITIALIZATION - perform only the initialization step
CRC_UPDATE - perform only an update, no initialization or finalization
CRC_FINALIZATION - perform only the finalization step
CRC_COMPLETE - perform the whole CRC calculation, including initialization and finalization
|
- Returns
- calculated CRC value
- See also
- generator polynom CRC_REV_POLYNOM
- Date
- Created 20.01.2019
- Modified 20.01.2019
- Author
- Michael Skutek, micha.nosp@m.el@s.nosp@m.kutek.nosp@m..de
Definition at line 70 of file crc.c.
Referenced by main().
|