RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Files | Macros | Functions
Cyclic Redundancy Check (CRC) Support

This group contains functions to calculate Cyclic Redundancy Check (CRC) values. More...

Files

file  crc24q.c
 This source file contains the implementation of _CRC24Q_Update() and _CRC24Q_Sequence_update().
 
file  crc.h
 This header file provides the interfaces of the Cyclic Redundancy Check (CRC) Support.
 

Macros

#define CRC24Q_SEED   0U
 This constant represents the default CRC-24Q seed state.
 
#define CRC24Q_MASK   0xffffffU
 This constant provides a mask to get a valid CRC-24Q value from the integers returned by _CRC24Q_Update() and _CRC24Q_Sequence_update().
 

Functions

uint32_t _CRC24Q_Update (uint32_t crc, uint8_t byte)
 Updates the CRC-24Q state using a byte.
 
uint32_t _CRC24Q_Sequence_update (uint32_t crc, const void *bytes, size_t size_in_bytes)
 Updates the CRC-24Q state using a sequence of bytes.
 

Detailed Description

This group contains functions to calculate Cyclic Redundancy Check (CRC) values.

Function Documentation

◆ _CRC24Q_Sequence_update()

uint32_t _CRC24Q_Sequence_update ( uint32_t  crc,
const void *  bytes,
size_t  size_in_bytes 
)

Updates the CRC-24Q state using a sequence of bytes.

Parameters
crcis the input CRC-24Q state.
bytes[in]is the sequence of bytes updating the input CRC-24Q state.
size_in_bytesis the size in bytes of the byte sequence.
Returns
Returns the updated CRC-24Q state. Use the CRC24Q_MASK to get a valid CRC-24Q value.

◆ _CRC24Q_Update()

uint32_t _CRC24Q_Update ( uint32_t  crc,
uint8_t  byte 
)

Updates the CRC-24Q state using a byte.

Parameters
crcis the input CRC-24Q state.
byteis the byte updating the input CRC-24Q state.
Returns
Returns the updated CRC-24Q state. Use the CRC24Q_MASK to get a valid CRC-24Q value.