uint32_t libmem_crc32_direct(const uint8_t *start, size_t size, uint32_t crc);
libmem_crc32_direct computes the CRC-32 checksum of an address range.
start — A pointer to the start of the address range.
size — The size of the address range in bytes.
crc — The initial CRC-32 value.
libmem_crc32_direct returns — The computed CRC-32 value.
This function computes a CRC-32 checksum on a block of data using the standard CRC-32 polynomial (0x04C11DB7). Note that this implementation doesn't reflect the input or the output and the result is not inverted.
Example:
uint32_t crc = 0xFFFFFFFF; crc = libmem_crc32_direct((uint8_t *)0x10000000, 1024, crc);