STM32L486xx HAL User Manual
Functions
Initialization and de-initialization functions
RNG Exported Functions

Initialization and de-initialization functions. More...

Functions

HAL_StatusTypeDef HAL_RNG_Init (RNG_HandleTypeDef *hrng)
 Initialize the RNG peripheral and initialize the associated handle.
HAL_StatusTypeDef HAL_RNG_DeInit (RNG_HandleTypeDef *hrng)
 DeInitialize the RNG peripheral.
__weak void HAL_RNG_MspInit (RNG_HandleTypeDef *hrng)
 Initialize the RNG MSP.
__weak void HAL_RNG_MspDeInit (RNG_HandleTypeDef *hrng)
 DeInitialize 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 de-initialization functions.

 ===============================================================================
          ##### Initialization and de-initialization 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 (MCU Specific Package)
      (+) DeInitialize the RNG MSP 
 

Function Documentation

HAL_StatusTypeDef HAL_RNG_DeInit ( RNG_HandleTypeDef hrng)

DeInitialize the RNG peripheral.

Parameters:
hrng,:pointer to a RNG_HandleTypeDef structure.
Return values:
HALstatus

Definition at line 237 of file stm32l4xx_hal_rng.c.

References __RNG_HandleTypeDef::ErrorCode, HAL_RNG_ERROR_NONE, HAL_RNG_MspDeInit(), HAL_RNG_STATE_RESET, __RNG_HandleTypeDef::Instance, __RNG_HandleTypeDef::MspDeInitCallback, and __RNG_HandleTypeDef::State.

HAL_StatusTypeDef HAL_RNG_Init ( RNG_HandleTypeDef hrng)

DeInitialize the RNG MSP.

Parameters:
hrng,:pointer to a RNG_HandleTypeDef structure.
Return values:
None

Definition at line 302 of file stm32l4xx_hal_rng.c.

Referenced by HAL_RNG_DeInit(), and HAL_RNG_UnRegisterCallback().

Initialize the RNG MSP.

Parameters:
hrng,:pointer to a RNG_HandleTypeDef structure.
Return values:
None

Definition at line 287 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 325 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 477 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 406 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 513 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.