Peripheral State functions

RNG State functions. More...

Functions

hal_rng_state_t hal_rng_get_state (rng_handle_t *p_rng)
 Return the RNG handle state. More...
 
hal_status_t hal_rng_suspend_reg (rng_handle_t *p_rng)
 Suspend some registers related to RNG configuration before sleep. More...
 
hal_status_t hal_rng_resume_reg (rng_handle_t *p_rng)
 Restore some registers related to RNG configuration after sleep. This function must be used in conjunction with the hal_rng_resume_reg(). More...
 

Detailed Description

RNG State functions.

 ===============================================================================
                      ##### Peripheral State functions #####
 ===============================================================================
    [..]
    This subsection provides a set of functions allowing to control the RNG.
     (+) hal_rng_get_state() API can be helpful to check in run-time the state of the RNG peripheral.

Function Documentation

◆ hal_rng_get_state()

hal_rng_state_t hal_rng_get_state ( rng_handle_t p_rng)

Return the RNG handle state.

Parameters
[in]p_rngPointer to a RNG handle which contains the configuration information for the specified HMAC module.
Return values
HAL_RNG_STATE_RESETPeripheral not initialized.
HAL_RNG_STATE_READYPeripheral initialized and ready for use.
HAL_RNG_STATE_BUSYPeripheral in indirect mode and busy.
HAL_RNG_STATE_ERRORPeripheral in error.
HAL_RNG_STATE_TIMEOUTPeripheral in timeout.

◆ hal_rng_resume_reg()

hal_status_t hal_rng_resume_reg ( rng_handle_t p_rng)

Restore some registers related to RNG configuration after sleep. This function must be used in conjunction with the hal_rng_resume_reg().

Parameters
[in]p_rngPointer to a RNG handle which contains the configuration information for the specified RNG module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.

◆ hal_rng_suspend_reg()

hal_status_t hal_rng_suspend_reg ( rng_handle_t p_rng)

Suspend some registers related to RNG configuration before sleep.

Parameters
[in]p_rngPointer to a RNG handle which contains the configuration information for the specified RNG module.
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.