Functions
Peripheral State functions
Peripheral Driver » HAL Driver » RNG » 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. 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_rng | Pointer to a RNG handle which contains the configuration information for the specified HMAC module.

Return values

  HAL_RNG_STATE_RESET | Peripheral not initialized.
  HAL_RNG_STATE_READY | Peripheral initialized and ready for use.
  HAL_RNG_STATE_BUSY | Peripheral in indirect mode and busy.
  HAL_RNG_STATE_ERROR | Peripheral in error.
  HAL_RNG_STATE_TIMEOUT | Peripheral 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_rng | Pointer to a RNG handle which contains the configuration information for the specified RNG module.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout 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_rng | Pointer to a RNG handle which contains the configuration information for the specified RNG module.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.