STM32F439xx HAL User Manual
Defines
RNG Exported Macros
RNG

Defines

#define __HAL_RNG_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_RNG_STATE_RESET)
 Reset RNG handle state.
#define __HAL_RNG_ENABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR |= RNG_CR_RNGEN)
 Enables the RNG peripheral.
#define __HAL_RNG_DISABLE(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~RNG_CR_RNGEN)
 Disables the RNG peripheral.
#define __HAL_RNG_GET_FLAG(__HANDLE__, __FLAG__)   (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__FLAG__))
 Check the selected RNG flag status.
#define __HAL_RNG_CLEAR_FLAG(__HANDLE__, __FLAG__)   /* dummy macro */
 Clears the selected RNG flag status.
#define __HAL_RNG_ENABLE_IT(__HANDLE__)   ((__HANDLE__)->Instance->CR |= RNG_CR_IE)
 Enables the RNG interrupts.
#define __HAL_RNG_DISABLE_IT(__HANDLE__)   ((__HANDLE__)->Instance->CR &= ~RNG_CR_IE)
 Disables the RNG interrupts.
#define __HAL_RNG_GET_IT(__HANDLE__, __INTERRUPT__)   (((__HANDLE__)->Instance->SR & (__INTERRUPT__)) == (__INTERRUPT__))
 Checks 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 */

Clears 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 185 of file stm32f4xx_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 225 of file stm32f4xx_hal_rng.h.

Referenced by HAL_RNG_IRQHandler().

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

Disables the RNG peripheral.

Parameters:
__HANDLE__RNG Handle
Return values:
None

Definition at line 163 of file stm32f4xx_hal_rng.h.

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

Disables the RNG interrupts.

Parameters:
__HANDLE__RNG Handle
Return values:
None

Definition at line 201 of file stm32f4xx_hal_rng.h.

Referenced by HAL_RNG_IRQHandler().

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

Enables the RNG peripheral.

Parameters:
__HANDLE__RNG Handle
Return values:
None

Definition at line 156 of file stm32f4xx_hal_rng.h.

Referenced by HAL_RNG_Init().

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

Enables the RNG interrupts.

Parameters:
__HANDLE__RNG Handle
Return values:
None

Definition at line 194 of file stm32f4xx_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 the selected RNG flag status.

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 175 of file stm32f4xx_hal_rng.h.

Referenced by HAL_RNG_GenerateRandomNumber().

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

Checks 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 213 of file stm32f4xx_hal_rng.h.

Referenced by HAL_RNG_IRQHandler().

#define __HAL_RNG_RESET_HANDLE_STATE (   __HANDLE__)    ((__HANDLE__)->State = HAL_RNG_STATE_RESET)

Reset RNG handle state.

Parameters:
__HANDLE__RNG Handle
Return values:
None

Definition at line 149 of file stm32f4xx_hal_rng.h.