Functions¶
-
group
group_crypto_lld_crc_functions
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.
- Parameters
base – The pointer to the CRYPTO instance.
polynomial – The polynomial (specified using 32 bits) used in the computing CRC.
dataReverse – The order in which data bytes are processed. 0 - MSB first; 1- LSB first.
dataXor – The byte mask for XORing data.
remReverse – A remainder reverse: 0 means the remainder is not reversed. 1 means reversed.
remXor – Specifies the mask with which the LFSR32 register is XORed to produce a remainder.
- Returns
-
__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
base – The pointer to the CRYPTO instance.
crc – The pointer to a computed CRC value. Must be 4-byte aligned.
data – The pointer to the message whose CRC is being computed.
dataSize – The size of a message in bytes.
lfsrInitState – The initial state of the LFSR.
- Returns
-
__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
base – The pointer to the CRYPTO instance.
width – The CRC width in bits.
polynomial – The polynomial (specified using 32 bits) used in the computing CRC.
dataReverse – The order in which data bytes are processed. 0 - MSB first; 1 - LSB first.
dataXor – The byte mask for XORing data
remReverse – A remainder reverse: 0 means the remainder is not reversed. 1 means reversed.
remXor – Specifies the mask with which the LFSR32 register is XORed to produce a remainder.
lfsrInitState – The initial state of the LFSR.
- Returns
-
__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
base – The pointer to the CRYPTO instance.
width – The CRC width in bits.
lfsrInitState – The initial state of the LFSR.
- Returns
-
__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
base – The pointer to the CRYPTO instance.
data – The pointer to the message whose CRC is being computed.
dataSize – The size of a message in bytes.
- Returns
-
__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
base – The pointer to the CRYPTO instance.
width – The CRC width in bits.
crc – The pointer to a computed CRC value. Must be 4-byte aligned.
- Returns
-
__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
base – The pointer to the CRYPTO instance.
width – The CRC width in bits.
crc – The pointer to a computed CRC value. Must be 4-byte aligned.
data – The pointer to the message whose CRC is being computed.
dataSize – The size of a message in bytes.
- Returns
-