STM32F4xx_HAL_Driver  1.8.3
stm32f4xx_ll_rng.c
Go to the documentation of this file.
1 
18 #if defined(USE_FULL_LL_DRIVER)
19 
20 /* Includes ------------------------------------------------------------------*/
21 #include "stm32f4xx_ll_rng.h"
22 #include "stm32f4xx_ll_bus.h"
23 
24 #ifdef USE_FULL_ASSERT
25 #include "stm32_assert.h"
26 #else
27 #define assert_param(expr) ((void)0U)
28 #endif /* USE_FULL_ASSERT */
29 
34 #if defined (RNG)
35 
40 /* Private types -------------------------------------------------------------*/
41 /* Private variables ---------------------------------------------------------*/
42 /* Private constants ---------------------------------------------------------*/
43 /* Private macros ------------------------------------------------------------*/
44 /* Private function prototypes -----------------------------------------------*/
45 
46 /* Exported functions --------------------------------------------------------*/
62 ErrorStatus LL_RNG_DeInit(const RNG_TypeDef *RNGx)
63 {
64  ErrorStatus status = SUCCESS;
65 
66  /* Check the parameters */
67  assert_param(IS_RNG_ALL_INSTANCE(RNGx));
68  if (RNGx == RNG)
69  {
70 #if !defined(RCC_AHB2_SUPPORT)
71  /* Enable RNG reset state */
72  LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_RNG);
73 
74  /* Release RNG from reset state */
75  LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_RNG);
76 #else
77  /* Enable RNG reset state */
78  LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_RNG);
79 
80  /* Release RNG from reset state */
81  LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_RNG);
82 #endif /* !RCC_AHB2_SUPPORT */
83  }
84  else
85  {
86  status = ERROR;
87  }
88 
89  return status;
90 }
91 
104 #endif /* RNG */
105 
110 #endif /* USE_FULL_LL_DRIVER */
111 
__STATIC_INLINE void LL_AHB1_GRP1_ReleaseReset(uint32_t Periphs)
Release AHB1 peripherals reset. @rmtoll AHB1RSTR GPIOARST LL_AHB1_GRP1_ReleaseReset AHB1RSTR GPIOBRS...
__STATIC_INLINE void LL_AHB1_GRP1_ForceReset(uint32_t Periphs)
Force AHB1 peripherals reset. @rmtoll AHB1RSTR GPIOARST LL_AHB1_GRP1_ForceReset AHB1RSTR GPIOBRST LL...
__STATIC_INLINE void LL_AHB2_GRP1_ForceReset(uint32_t Periphs)
Force AHB2 peripherals reset. @rmtoll AHB2RSTR DCMIRST LL_AHB2_GRP1_ForceReset AHB2RSTR CRYPRST LL_A...
__STATIC_INLINE void LL_AHB2_GRP1_ReleaseReset(uint32_t Periphs)
Release AHB2 peripherals reset. @rmtoll AHB2RSTR DCMIRST LL_AHB2_GRP1_ReleaseReset AHB2RSTR CRYPRST ...
ErrorStatus LL_RNG_DeInit(const RNG_TypeDef *RNGx)
De-initialize RNG registers (Registers restored to their default values).
Header file of BUS LL module.
Header file of RNG LL module.