CRC32 routines for BMP LPC1768.
More...
#include <stdint.h>
|
| uint32_t | crc32 (void *buf, uint32_t len, uint32_t crc) |
| | Compute CRC32 for a buffer of given length.
|
| |
| uint32_t | crc32_chk (void *buf, uint32_t len) |
| | Compute the CRC of a buffer.
|
| |
| void | crc32_buf (void *buf, uint32_t len) |
| | Compute and insert CRC32 of a buffer where the CRC is placed in the last 4 bytes.
|
| |
|
|
const uint32_t | crc_table [] |
| | CRC constants, precomputed from CRC polynomial.
|
| |
CRC32 routines for BMP LPC1768.
- Author
- Steve Temple, APT Group, School of Computer Science
◆ crc32()
| uint32_t crc32 |
( |
void * |
buf, |
|
|
uint32_t |
len, |
|
|
uint32_t |
crc |
|
) |
| |
Compute CRC32 for a buffer of given length.
- Parameters
-
| [in] | buf | the data to compute the CRC of |
| [in] | len | number of bytes in buf |
| [in] | crc | can be 0xffffffff to start checking, or result of a previous call. |
- Returns
- The final result needs to be inverted to produce valid CRC32.
◆ crc32_chk()
| uint32_t crc32_chk |
( |
void * |
buf, |
|
|
uint32_t |
len |
|
) |
| |
Compute the CRC of a buffer.
- Parameters
-
| [in] | buf | the data to compute the CRC of |
| [in] | len | number of bytes in buf |
- Returns
- The CRC of the buffer
◆ crc32_buf()
| void crc32_buf |
( |
void * |
buf, |
|
|
uint32_t |
len |
|
) |
| |
Compute and insert CRC32 of a buffer where the CRC is placed in the last 4 bytes.
- Parameters
-
| [in] | buf | the data to compute the CRC of |
| [in] | len | number of bytes in buf |