AFBR-S50 API Reference Manual v1.5.6
AFBR-S50 Time-of-Flight Sensor SDK for Embedded Software
Loading...
Searching...
No Matches

SCI CRC8 (Cyclic Redundancy Check) More...

Collaboration diagram for SCI: CRC8:

Functions

void SCI_CRC8_Init (void)
 Initialization of the CRC8 module.
 
uint8_t SCI_CRC8_Compute (uint8_t crc, const uint8_t *data, size_t length)
 Calculation routine for the CRC8 checksum.
 

Detailed Description

SCI CRC8 (Cyclic Redundancy Check)


CRC8 checksum calculation with an optimized algorithm that utilizes an look-up table and proceeds a whole byte at each step.

See also
http://www.sunshine2k.de/articles/coding/crc/understanding_crc.html

Function Documentation

◆ SCI_CRC8_Compute()

uint8_t SCI_CRC8_Compute ( uint8_t  crc,
const uint8_t *  data,
size_t  length 
)

Calculation routine for the CRC8 checksum.


Uses an optimized algorithm that utilizes an look-up table with 256 entries of 8-bit values (total: 256 bytes) and proceeds a whole byte at each step.

See also
http://www.sunshine2k.de/articles/coding/crc/understanding_crc.html
Parameters
crcThe previous CRC8. If starting, pass zero.
dataPointer to the send or receive array.
lengthNumber of bytes in the frame array.
Returns
Returns the CRC8 checksum.

◆ SCI_CRC8_Init()

void SCI_CRC8_Init ( void  )

Initialization of the CRC8 module.


Prepares the CRC8 lookup table.