STM32L4xx_HAL_Driver  1.14.0
Initialization and de-initialization functions

Functions

ErrorStatus LL_RNG_Init (RNG_TypeDef *RNGx, LL_RNG_InitTypeDef *RNG_InitStruct)
 Initialize RNG registers according to the specified parameters in RNG_InitStruct. More...
 
void LL_RNG_StructInit (LL_RNG_InitTypeDef *RNG_InitStruct)
 Set each LL_RNG_InitTypeDef field to default value. More...
 
ErrorStatus LL_RNG_DeInit (RNG_TypeDef *RNGx)
 De-initialize RNG registers (Registers restored to their default values). More...
 

Detailed Description

Function Documentation

◆ LL_RNG_DeInit()

ErrorStatus LL_RNG_DeInit ( RNG_TypeDef *  RNGx)

De-initialize RNG registers (Registers restored to their default values).

Parameters
RNGxRNG Instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RNG registers are de-initialized
  • ERROR: not applicable

Definition at line 75 of file stm32l4xx_ll_rng.c.

76 {
77  /* Check the parameters */
78  assert_param(IS_RNG_ALL_INSTANCE(RNGx));
79 
80  /* Enable RNG reset state */
81  LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_RNG);
82 
83  /* Release RNG from reset state */
84  LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_RNG);
85 
86  return (SUCCESS);
87 }
__STATIC_INLINE void LL_AHB2_GRP1_ForceReset(uint32_t Periphs)
Force AHB2 peripherals reset. AHB2RSTR GPIOARST LL_AHB2_GRP1_ForceReset AHB2RSTR GPIOBRST LL_AHB2_G...
__STATIC_INLINE void LL_AHB2_GRP1_ReleaseReset(uint32_t Periphs)
Release AHB2 peripherals reset. AHB2RSTR GPIOARST LL_AHB2_GRP1_ReleaseReset AHB2RSTR GPIOBRST LL_AH...
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ LL_RNG_Init()

ErrorStatus LL_RNG_Init ( RNG_TypeDef *  RNGx,
LL_RNG_InitTypeDef RNG_InitStruct 
)

Initialize RNG registers according to the specified parameters in RNG_InitStruct.

Parameters
RNGxRNG Instance
RNG_InitStructpointer to a LL_RNG_InitTypeDef structure that contains the configuration information for the specified RNG peripheral.
Return values
AnErrorStatus enumeration value:
  • SUCCESS: RNG registers are initialized according to RNG_InitStruct content
  • ERROR: not applicable

Definition at line 99 of file stm32l4xx_ll_rng.c.

100 {
101  /* Check the parameters */
102  assert_param(IS_RNG_ALL_INSTANCE(RNGx));
103  assert_param(IS_LL_RNG_CED(RNG_InitStruct->ClockErrorDetection));
104 
105  /* Clock Error Detection configuration */
106  MODIFY_REG(RNGx->CR, RNG_CR_CED, RNG_InitStruct->ClockErrorDetection);
107 
108  return (SUCCESS);
109 }
uint32_t ClockErrorDetection
MODIFY_REG(hrtc->Instance->CR, RTC_CR_WUCKSEL,(uint32_t) WakeUpClock)
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))

◆ LL_RNG_StructInit()

void LL_RNG_StructInit ( LL_RNG_InitTypeDef RNG_InitStruct)

Set each LL_RNG_InitTypeDef field to default value.

Parameters
RNG_InitStructpointer to a LL_RNG_InitTypeDef structure whose fields will be set to default values.
Return values
None

Definition at line 117 of file stm32l4xx_ll_rng.c.

118 {
119  /* Set RNG_InitStruct fields to default values */
120  RNG_InitStruct->ClockErrorDetection = LL_RNG_CED_ENABLE;
121 
122 }
uint32_t ClockErrorDetection