OpenOCD
crc32.h File Reference

A generic CRC32 implementation. More...

Include dependency graph for crc32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRC32_POLY_LE   0xedb88320
 CRC32 polynomial commonly used for little endian CRC32. More...
 

Functions

uint32_t crc32_le (uint32_t poly, uint32_t seed, const void *data, size_t data_len)
 Calculate the CRC32 value of the given data. More...
 

Detailed Description

A generic CRC32 implementation.

Definition in file crc32.h.

Macro Definition Documentation

◆ CRC32_POLY_LE

#define CRC32_POLY_LE   0xedb88320

CRC32 polynomial commonly used for little endian CRC32.

Definition at line 21 of file crc32.h.

Function Documentation

◆ crc32_le()

uint32_t crc32_le ( uint32_t  poly,
uint32_t  seed,
const void *  data,
size_t  data_len 
)

Calculate the CRC32 value of the given data.

Parameters
polyThe polynomial of the CRC
seedThe seed to use (mostly either 0 or 0xffffffff)
dataThe data to calculate the CRC32 of
data_lenThe length of the data in data in bytes
Returns
The CRC value of the first data_len bytes at data
Note
This function can be used to incrementally compute the CRC one chunk of data at a time by using the CRC32 of the previous chunk as seed for the next chunk.

Definition at line 33 of file crc32.c.

References crc_le_step().

Referenced by adbg_wb_burst_read(), adbg_wb_burst_write(), and qn908x_probe().