CRC-8 checksum algorithms. More...

Detailed Description

CRC-8 checksum algorithms.

Files

file  crc8.h
 CRC-8 definitions.
 

Functions

uint8_t crc8 (const uint8_t *data, size_t len, uint8_t poly, uint8_t seed)
 Calculate CRC-8. More...
 

Function Documentation

◆ crc8()

uint8_t crc8 ( const uint8_t *  data,
size_t  len,
uint8_t  poly,
uint8_t  seed 
)

Calculate CRC-8.

Parameters
[in]dataStart of memory area to checksum
[in]lenNumber of bytes in buf to calculate checksum for
[in]polyThe generator polynomial for the checksum
[in]seedThe seed (starting value) for the checksum
Note
Reflected inputs or outputs and final XOR must be realized by the caller if needed.
Returns
Checksum of the specified memory area.