PSoC 6 Peripheral Driver Library

General Description

Functions

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_Init (CRYPTO_Type *base, uint32_t polynomial, uint32_t dataReverse, uint32_t dataXor, uint32_t remReverse, uint32_t remXor)
 Initializes the CRC calculation. More...
 
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc (CRYPTO_Type *base, uint32_t *crc, void const *data, uint32_t dataSize, uint32_t lfsrInitState)
 Performs the CRC calculation on a message. More...
 
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcInit (CRYPTO_Type *base, uint32_t width, uint32_t polynomial, uint32_t dataReverse, uint32_t dataXor, uint32_t remReverse, uint32_t remXor, uint32_t lfsrInitState)
 Initializes the CRC calculation. More...
 
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcStart (CRYPTO_Type *base, uint32_t width, uint32_t lfsrInitState)
 Prepares the CRC calculation by setting an initial seed value. More...
 
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcPartial (CRYPTO_Type *base, void const *data, uint32_t dataSize)
 Performs the CRC calculation of a message part. More...
 
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcFinish (CRYPTO_Type *base, uint32_t width, uint32_t *crc)
 Finalizes the CRC calculation. More...
 
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_Calc (CRYPTO_Type *base, uint32_t width, uint32_t *crc, void const *data, uint32_t dataSize)
 Performs the CRC calculation on a message. More...
 

Function Documentation

◆ Cy_Crypto_Core_Crc_Init()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_Init ( CRYPTO_Type *  base,
uint32_t  polynomial,
uint32_t  dataReverse,
uint32_t  dataXor,
uint32_t  remReverse,
uint32_t  remXor 
)

Initializes the CRC calculation.

Parameters
baseThe pointer to the CRYPTO instance.
polynomialThe polynomial (specified using 32 bits) used in the computing CRC.
dataReverseThe order in which data bytes are processed. 0 - MSB first; 1- LSB first.
dataXorThe byte mask for XORing data.
remReverseA remainder reverse: 0 means the remainder is not reversed. 1 means reversed.
remXorSpecifies the mask with which the LFSR32 register is XORed to produce a remainder.
Returns
cy_en_crypto_status_t

◆ Cy_Crypto_Core_Crc()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc ( CRYPTO_Type *  base,
uint32_t *  crc,
void const *  data,
uint32_t  dataSize,
uint32_t  lfsrInitState 
)

Performs the CRC calculation on a message.

Parameters
baseThe pointer to the CRYPTO instance.
crcThe pointer to a computed CRC value. Must be 4-byte aligned.
dataThe pointer to the message whose CRC is being computed.
dataSizeThe size of a message in bytes.
lfsrInitStateThe initial state of the LFSR.
Returns
cy_en_crypto_status_t

◆ Cy_Crypto_Core_Crc_CalcInit()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcInit ( CRYPTO_Type *  base,
uint32_t  width,
uint32_t  polynomial,
uint32_t  dataReverse,
uint32_t  dataXor,
uint32_t  remReverse,
uint32_t  remXor,
uint32_t  lfsrInitState 
)

Initializes the CRC calculation.

Parameters
baseThe pointer to the CRYPTO instance.
widthThe CRC width in bits.
polynomialThe polynomial (specified using 32 bits) used in the computing CRC.
dataReverseThe order in which data bytes are processed. 0 - MSB first; 1 - LSB first.
dataXorThe byte mask for XORing data
remReverseA remainder reverse: 0 means the remainder is not reversed. 1 means reversed.
remXorSpecifies the mask with which the LFSR32 register is XORed to produce a remainder.
lfsrInitStateThe initial state of the LFSR.
Returns
cy_en_crypto_status_t

◆ Cy_Crypto_Core_Crc_CalcStart()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcStart ( CRYPTO_Type *  base,
uint32_t  width,
uint32_t  lfsrInitState 
)

Prepares the CRC calculation by setting an initial seed value.

Parameters
baseThe pointer to the CRYPTO instance.
widthThe CRC width in bits.
lfsrInitStateThe initial state of the LFSR.
Returns
cy_en_crypto_status_t

◆ Cy_Crypto_Core_Crc_CalcPartial()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcPartial ( CRYPTO_Type *  base,
void const *  data,
uint32_t  dataSize 
)

Performs the CRC calculation of a message part.

Parameters
baseThe pointer to the CRYPTO instance.
dataThe pointer to the message whose CRC is being computed.
dataSizeThe size of a message in bytes.
Returns
cy_en_crypto_status_t

◆ Cy_Crypto_Core_Crc_CalcFinish()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_CalcFinish ( CRYPTO_Type *  base,
uint32_t  width,
uint32_t *  crc 
)

Finalizes the CRC calculation.

Parameters
baseThe pointer to the CRYPTO instance.
widthThe CRC width in bits.
crcThe pointer to a computed CRC value. Must be 4-byte aligned.
Returns
cy_en_crypto_status_t

◆ Cy_Crypto_Core_Crc_Calc()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Core_Crc_Calc ( CRYPTO_Type *  base,
uint32_t  width,
uint32_t *  crc,
void const *  data,
uint32_t  dataSize 
)

Performs the CRC calculation on a message.

Parameters
baseThe pointer to the CRYPTO instance.
widthThe CRC width in bits.
crcThe pointer to a computed CRC value. Must be 4-byte aligned.
dataThe pointer to the message whose CRC is being computed.
dataSizeThe size of a message in bytes.
Returns
cy_en_crypto_status_t