CAT2 Peripheral Driver Library
Control and status

Functions

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Enable (CRYPTO_Type *base)
 This function enables (turns on) the Crypto hardware. More...
 
__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Disable (CRYPTO_Type *base)
 This function disables (turns off) the Crypto hardware. More...
 
__STATIC_INLINE bool Cy_Crypto_IsEnabled (CRYPTO_Type *base)
 The function checks whether the Crypto hardware is enabled. More...
 
cy_en_crypto_status_t Cy_Crypto_ClearState (CRYPTO_Type *base)
 This function clears the current state of the Crypto block. More...
 
__STATIC_INLINE void Cy_Crypto_WaitForReady (CRYPTO_Type *base)
 The function waits for any ongoing Crypto operation (AES, CRC, or SHA) to complete and returns when the hardware is no longer busy. More...
 

Detailed Description

Function Documentation

◆ Cy_Crypto_Enable()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Enable ( CRYPTO_Type *  base)

This function enables (turns on) the Crypto hardware.

Parameters
baseBase address of the Crypto block registers
Returns
Crypto status cy_en_crypto_status_t
Function Usage
cy_en_crypto_status_t cryptoStatus;
/* Enable Crypto IP */
cryptoStatus = Cy_Crypto_Enable(
CRYPTO); /* Base address of the Crypto block registers */
/* ... check for errors... */

◆ Cy_Crypto_Disable()

__STATIC_INLINE cy_en_crypto_status_t Cy_Crypto_Disable ( CRYPTO_Type *  base)

This function disables (turns off) the Crypto hardware.

Parameters
baseBase address of the Crypto block registers
Returns
Crypto status cy_en_crypto_status_t
Function Usage
/* Check if Crypto IP is enabled */
if (Cy_Crypto_IsEnabled(CRYPTO))
{
/* Disable Crypto IP */
}

◆ Cy_Crypto_IsEnabled()

__STATIC_INLINE bool Cy_Crypto_IsEnabled ( CRYPTO_Type *  base)

The function checks whether the Crypto hardware is enabled.

Parameters
baseBase address of the Crypto block registers
Returns
Crypto hardware status. True if enabled; else false.
Function Usage
/* Check if Crypto IP is enabled */
if (Cy_Crypto_IsEnabled(CRYPTO))
{
/* Disable Crypto IP */
}

◆ Cy_Crypto_ClearState()

cy_en_crypto_status_t Cy_Crypto_ClearState ( CRYPTO_Type *  base)

This function clears the current state of the Crypto block.

All the Crypto block registers are set to their default (reset) values and the memory buffer is initialized with zeros.

Parameters
baseBase address of the Crypto block registers
Returns
Crypto status cy_en_crypto_status_t
Function Usage
/* Check if Crypto IP is enabled */
if (Cy_Crypto_IsEnabled(CRYPTO))
{
/* Wait for Crypto IP to become ready for a Crypto operation */
/* ... Perform Crypto operation ... */
/* Clear the Crypto block's state when Crypto operation is completed. */
}
All the Crypto block registers are set to their default (Reset) values and the memory buffer is initialized with zeros.

◆ Cy_Crypto_WaitForReady()

__STATIC_INLINE void Cy_Crypto_WaitForReady ( CRYPTO_Type *  base)

The function waits for any ongoing Crypto operation (AES, CRC, or SHA) to complete and returns when the hardware is no longer busy.

Parameters
baseBase address of the Crypto block registers
Function Usage
/* Check if Crypto IP is enabled */
if (Cy_Crypto_IsEnabled(CRYPTO))
{
/* Wait for Crypto IP to become ready for a Crypto operation */
/* ... Perform Crypto operation ... */
}