1 /** 2 ****************************************************************************** 3 * @file stm32f4xx_ll_rng.c 4 * @author MCD Application Team 5 * @brief RNG LL module driver. 6 ****************************************************************************** 7 * @attention 8 * 9 * <h2><center>© Copyright (c) 2016 STMicroelectronics. 10 * All rights reserved.</center></h2> 11 * 12 * This software component is licensed by ST under BSD 3-Clause license, 13 * the "License"; You may not use this file except in compliance with the 14 * License. You may obtain a copy of the License at: 15 * opensource.org/licenses/BSD-3-Clause 16 * 17 ****************************************************************************** 18 */ 19 #if defined(USE_FULL_LL_DRIVER) 20 21 /* Includes ------------------------------------------------------------------*/ 22 #include "stm32f4xx_ll_rng.h" 23 #include "stm32f4xx_ll_bus.h" 24 25 #ifdef USE_FULL_ASSERT 26 #include "stm32_assert.h" 27 #else 28 #define assert_param(expr) ((void)0U) 29 #endif 30 31 /** @addtogroup STM32F4xx_LL_Driver 32 * @{ 33 */ 34 35 #if defined (RNG) 36 37 /** @addtogroup RNG_LL 38 * @{ 39 */ 40 41 /* Private types -------------------------------------------------------------*/ 42 /* Private variables ---------------------------------------------------------*/ 43 /* Private constants ---------------------------------------------------------*/ 44 /* Private macros ------------------------------------------------------------*/ 45 /* Private function prototypes -----------------------------------------------*/ 46 47 /* Exported functions --------------------------------------------------------*/ 48 /** @addtogroup RNG_LL_Exported_Functions 49 * @{ 50 */ 51 52 /** @addtogroup RNG_LL_EF_Init 53 * @{ 54 */ 55 56 /** 57 * @brief De-initialize RNG registers (Registers restored to their default values). 58 * @param RNGx RNG Instance 59 * @retval An ErrorStatus enumeration value: 60 * - SUCCESS: RNG registers are de-initialized 61 * - ERROR: not applicable 62 */ LL_RNG_DeInit(RNG_TypeDef * RNGx)63ErrorStatus LL_RNG_DeInit(RNG_TypeDef *RNGx) 64 { 65 /* Check the parameters */ 66 assert_param(IS_RNG_ALL_INSTANCE(RNGx)); 67 #if !defined (RCC_AHB2_SUPPORT) 68 /* Enable RNG reset state */ 69 LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_RNG); 70 71 /* Release RNG from reset state */ 72 LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_RNG); 73 #else 74 /* Enable RNG reset state */ 75 LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_RNG); 76 77 /* Release RNG from reset state */ 78 LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_RNG); 79 #endif 80 return (SUCCESS); 81 } 82 83 /** 84 * @} 85 */ 86 87 /** 88 * @} 89 */ 90 91 /** 92 * @} 93 */ 94 95 #endif /* RNG */ 96 97 /** 98 * @} 99 */ 100 101 #endif /* USE_FULL_LL_DRIVER */ 102 103 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 104 105