STM32L443xx HAL User Manual
Functions
Initialization and configuration functions
RNG Exported Functions

Initialization and configuration functions. More...

Functions

HAL_StatusTypeDef HAL_RNG_Init (RNG_HandleTypeDef *hrng)
 Initializes the RNG peripheral and creates the associated handle.
HAL_StatusTypeDef HAL_RNG_DeInit (RNG_HandleTypeDef *hrng)
 DeInitializes the RNG peripheral.
__weak void HAL_RNG_MspInit (RNG_HandleTypeDef *hrng)
 Initializes the RNG MSP.
__weak void HAL_RNG_MspDeInit (RNG_HandleTypeDef *hrng)
 DeInitializes the RNG MSP.
HAL_StatusTypeDef HAL_RNG_RegisterCallback (RNG_HandleTypeDef *hrng, HAL_RNG_CallbackIDTypeDef CallbackID, pRNG_CallbackTypeDef pCallback)
 Register a User RNG Callback To be used instead of the weak predefined callback.
HAL_StatusTypeDef HAL_RNG_UnRegisterCallback (RNG_HandleTypeDef *hrng, HAL_RNG_CallbackIDTypeDef CallbackID)
 Unregister an RNG Callback RNG callabck is redirected to the weak predefined callback.
HAL_StatusTypeDef HAL_RNG_RegisterReadyDataCallback (RNG_HandleTypeDef *hrng, pRNG_ReadyDataCallbackTypeDef pCallback)
 Register Data Ready RNG Callback To be used instead of the weak HAL_RNG_ReadyDataCallback() predefined callback.
HAL_StatusTypeDef HAL_RNG_UnRegisterReadyDataCallback (RNG_HandleTypeDef *hrng)
 UnRegister the Data Ready RNG Callback Data Ready RNG Callback is redirected to the weak HAL_RNG_ReadyDataCallback() predefined callback.

Detailed Description

Initialization and configuration functions.

 ===============================================================================
          ##### Initialization and configuration functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Initialize the RNG according to the specified parameters
          in the RNG_InitTypeDef and create the associated handle
      (+) DeInitialize the RNG peripheral
      (+) Initialize the RNG MSP
      (+) DeInitialize RNG MSP


Function Documentation

HAL_StatusTypeDef HAL_RNG_DeInit ( RNG_HandleTypeDef hrng)

DeInitializes the RNG peripheral.

Parameters:
hrngpointer to a RNG_HandleTypeDef structure that contains the configuration information for RNG.
Return values:
HALstatus

Definition at line 294 of file stm32l4xx_hal_rng.c.

References __RNG_HandleTypeDef::ErrorCode, HAL_GetTick(), HAL_RNG_ERROR_NONE, HAL_RNG_ERROR_TIMEOUT, HAL_RNG_MspDeInit(), HAL_RNG_STATE_READY, HAL_RNG_STATE_RESET, __RNG_HandleTypeDef::Instance, __RNG_HandleTypeDef::MspDeInitCallback, RNG_TIMEOUT_VALUE, and __RNG_HandleTypeDef::State.

HAL_StatusTypeDef HAL_RNG_Init ( RNG_HandleTypeDef hrng)

DeInitializes the RNG MSP.

Parameters:
hrngpointer to a RNG_HandleTypeDef structure that contains the configuration information for RNG.
Return values:
None

Definition at line 390 of file stm32l4xx_hal_rng.c.

Referenced by HAL_RNG_DeInit(), and HAL_RNG_UnRegisterCallback().

Initializes the RNG MSP.

Parameters:
hrngpointer to a RNG_HandleTypeDef structure that contains the configuration information for RNG.
Return values:
None

Definition at line 375 of file stm32l4xx_hal_rng.c.

Referenced by HAL_RNG_Init(), and HAL_RNG_UnRegisterCallback().

HAL_StatusTypeDef HAL_RNG_RegisterCallback ( RNG_HandleTypeDef hrng,
HAL_RNG_CallbackIDTypeDef  CallbackID,
pRNG_CallbackTypeDef  pCallback 
)

Register a User RNG Callback To be used instead of the weak predefined callback.

Parameters:
hrngRNG handle
CallbackIDID of the callback to be registered This parameter can be one of the following values:
pCallbackpointer to the Callback function
Return values:
HALstatus

Definition at line 412 of file stm32l4xx_hal_rng.c.

References __RNG_HandleTypeDef::ErrorCallback, __RNG_HandleTypeDef::ErrorCode, HAL_RNG_ERROR_CB_ID, HAL_RNG_ERROR_INVALID_CALLBACK, HAL_RNG_MSPDEINIT_CB_ID, HAL_RNG_MSPINIT_CB_ID, HAL_RNG_STATE_READY, HAL_RNG_STATE_RESET, __RNG_HandleTypeDef::MspDeInitCallback, __RNG_HandleTypeDef::MspInitCallback, and __RNG_HandleTypeDef::State.

Register Data Ready RNG Callback To be used instead of the weak HAL_RNG_ReadyDataCallback() predefined callback.

Parameters:
hrngRNG handle
pCallbackpointer to the Data Ready Callback function
Return values:
HALstatus

Definition at line 564 of file stm32l4xx_hal_rng.c.

References __RNG_HandleTypeDef::ErrorCode, HAL_RNG_ERROR_INVALID_CALLBACK, HAL_RNG_STATE_READY, __RNG_HandleTypeDef::ReadyDataCallback, and __RNG_HandleTypeDef::State.

HAL_StatusTypeDef HAL_RNG_UnRegisterCallback ( RNG_HandleTypeDef hrng,
HAL_RNG_CallbackIDTypeDef  CallbackID 
)

Unregister an RNG Callback RNG callabck is redirected to the weak predefined callback.

Parameters:
hrngRNG handle
CallbackIDID of the callback to be unregistered This parameter can be one of the following values:
Return values:
HALstatus

Definition at line 493 of file stm32l4xx_hal_rng.c.

References __RNG_HandleTypeDef::ErrorCallback, __RNG_HandleTypeDef::ErrorCode, HAL_RNG_ERROR_CB_ID, HAL_RNG_ERROR_INVALID_CALLBACK, HAL_RNG_ErrorCallback(), HAL_RNG_MspDeInit(), HAL_RNG_MSPDEINIT_CB_ID, HAL_RNG_MspInit(), HAL_RNG_MSPINIT_CB_ID, HAL_RNG_STATE_READY, HAL_RNG_STATE_RESET, __RNG_HandleTypeDef::MspDeInitCallback, __RNG_HandleTypeDef::MspInitCallback, and __RNG_HandleTypeDef::State.

UnRegister the Data Ready RNG Callback Data Ready RNG Callback is redirected to the weak HAL_RNG_ReadyDataCallback() predefined callback.

Parameters:
hrngRNG handle
Return values:
HALstatus

Definition at line 600 of file stm32l4xx_hal_rng.c.

References __RNG_HandleTypeDef::ErrorCode, HAL_RNG_ERROR_INVALID_CALLBACK, HAL_RNG_ReadyDataCallback(), HAL_RNG_STATE_READY, __RNG_HandleTypeDef::ReadyDataCallback, and __RNG_HandleTypeDef::State.