STM32L486xx HAL User Manual
Defines
RNG Exported Macros
RNG

Defines

#define __HAL_RNG_RESET_HANDLE_STATE(__HANDLE__)
 Reset RNG handle state.
#define __HAL_RNG_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR |= RNG_CR_RNGEN)
 Enable the RNG peripheral.
#define __HAL_RNG_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~RNG_CR_RNGEN)
 Disable the RNG peripheral.
#define __HAL_RNG_GET_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
 Check whether the specified RNG flag is set or not.
#define __HAL_RNG_CLEAR_FLAG(__HANDLE__, __FLAG__)   /* dummy macro */
 Clear the selected RNG flag status.
#define __HAL_RNG_ENABLE_IT(__HANDLE__)   ((__HANDLE__)->Instance->CR |= RNG_CR_IE)
 Enable the RNG interrupt.
#define __HAL_RNG_DISABLE_IT(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~RNG_CR_IE)
 Disable the RNG interrupt.
#define __HAL_RNG_GET_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->SR & (__INTERRUPT__)) == (__INTERRUPT__))
 Check whether the specified RNG interrupt has occurred or not.
#define __HAL_RNG_CLEAR_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->SR) = ~(__INTERRUPT__))
 Clear the RNG interrupt status flags.

Define Documentation

#define __HAL_RNG_CLEAR_FLAG (   __HANDLE__,
  __FLAG__ 
)    /* dummy macro */

Clear the selected RNG flag status.

Parameters:
__HANDLE__,:RNG handle
__FLAG__,:RNG flag to clear
Note:
WARNING: This is a dummy macro for HAL code alignment, flags RNG_FLAG_DRDY, RNG_FLAG_CECS and RNG_FLAG_SECS are read-only.
Return values:
None

Definition at line 241 of file stm32l4xx_hal_rng.h.

#define __HAL_RNG_CLEAR_IT (   __HANDLE__,
  __INTERRUPT__ 
)    (((__HANDLE__)->Instance->SR) = ~(__INTERRUPT__))

Clear the RNG interrupt status flags.

Parameters:
__HANDLE__,:RNG Handle
__INTERRUPT__,:specifies the RNG interrupt status flag to clear. This parameter can be one of the following values:
  • RNG_IT_CEI: Clock error interrupt
  • RNG_IT_SEI: Seed error interrupt
Note:
RNG_IT_DRDY flag is read-only, reading RNG_DR register automatically clears RNG_IT_DRDY.
Return values:
None

Definition at line 279 of file stm32l4xx_hal_rng.h.

Referenced by HAL_RNG_IRQHandler().

#define __HAL_RNG_DISABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR &= ~RNG_CR_RNGEN)

Disable the RNG peripheral.

Parameters:
__HANDLE__,:RNG Handle
Return values:
None

Definition at line 219 of file stm32l4xx_hal_rng.h.

#define __HAL_RNG_DISABLE_IT (   __HANDLE__)    ((__HANDLE__)->Instance->CR &= ~RNG_CR_IE)

Disable the RNG interrupt.

Parameters:
__HANDLE__,:RNG Handle
Return values:
None

Definition at line 255 of file stm32l4xx_hal_rng.h.

Referenced by HAL_RNG_IRQHandler().

#define __HAL_RNG_ENABLE (   __HANDLE__)    ((__HANDLE__)->Instance->CR |= RNG_CR_RNGEN)

Enable the RNG peripheral.

Parameters:
__HANDLE__,:RNG Handle
Return values:
None

Definition at line 212 of file stm32l4xx_hal_rng.h.

Referenced by HAL_RNG_Init().

#define __HAL_RNG_ENABLE_IT (   __HANDLE__)    ((__HANDLE__)->Instance->CR |= RNG_CR_IE)

Enable the RNG interrupt.

Parameters:
__HANDLE__,:RNG Handle
Return values:
None

Definition at line 248 of file stm32l4xx_hal_rng.h.

Referenced by HAL_RNG_GenerateRandomNumber_IT(), and HAL_RNG_GetRandomNumber_IT().

#define __HAL_RNG_GET_FLAG (   __HANDLE__,
  __FLAG__ 
)    (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))

Check whether the specified RNG flag is set or not.

Parameters:
__HANDLE__,:RNG Handle
__FLAG__,:RNG flag This parameter can be one of the following values:
  • RNG_FLAG_DRDY: Data ready
  • RNG_FLAG_CECS: Clock error current status
  • RNG_FLAG_SECS: Seed error current status
Return values:
Thenew state of __FLAG__ (SET or RESET).

Definition at line 231 of file stm32l4xx_hal_rng.h.

Referenced by HAL_RNG_GenerateRandomNumber().

#define __HAL_RNG_GET_IT (   __HANDLE__,
  __INTERRUPT__ 
)    (((__HANDLE__)->Instance->SR & (__INTERRUPT__)) == (__INTERRUPT__))

Check whether the specified RNG interrupt has occurred or not.

Parameters:
__HANDLE__,:RNG Handle
__INTERRUPT__,:specifies the RNG interrupt status flag to check. This parameter can be one of the following values:
  • RNG_IT_DRDY: Data ready interrupt
  • RNG_IT_CEI: Clock error interrupt
  • RNG_IT_SEI: Seed error interrupt
Return values:
Thenew state of __INTERRUPT__ (SET or RESET).

Definition at line 267 of file stm32l4xx_hal_rng.h.

Referenced by HAL_RNG_IRQHandler().

#define __HAL_RNG_RESET_HANDLE_STATE (   __HANDLE__)
Value:
do{                                                   \
                                                       (__HANDLE__)->State = HAL_RNG_STATE_RESET;       \
                                                       (__HANDLE__)->MspInitCallback = NULL;            \
                                                       (__HANDLE__)->MspDeInitCallback = NULL;          \
                                                    } while(0U)

Reset RNG handle state.

Parameters:
__HANDLE__,:RNG Handle
Return values:
None

Definition at line 198 of file stm32l4xx_hal_rng.h.