STM32F479xx HAL User Manual
|
00001 /** 00002 ****************************************************************************** 00003 * @file stm32f4xx_ll_rng.c 00004 * @author MCD Application Team 00005 * @brief RNG LL module driver. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© Copyright (c) 2016 STMicroelectronics. 00010 * All rights reserved.</center></h2> 00011 * 00012 * This software component is licensed by ST under BSD 3-Clause license, 00013 * the "License"; You may not use this file except in compliance with the 00014 * License. You may obtain a copy of the License at: 00015 * opensource.org/licenses/BSD-3-Clause 00016 * 00017 ****************************************************************************** 00018 */ 00019 #if defined(USE_FULL_LL_DRIVER) 00020 00021 /* Includes ------------------------------------------------------------------*/ 00022 #include "stm32f4xx_ll_rng.h" 00023 #include "stm32f4xx_ll_bus.h" 00024 00025 #ifdef USE_FULL_ASSERT 00026 #include "stm32_assert.h" 00027 #else 00028 #define assert_param(expr) ((void)0U) 00029 #endif /* USE_FULL_ASSERT */ 00030 00031 /** @addtogroup STM32F4xx_LL_Driver 00032 * @{ 00033 */ 00034 00035 #if defined (RNG) 00036 00037 /** @addtogroup RNG_LL 00038 * @{ 00039 */ 00040 00041 /* Private types -------------------------------------------------------------*/ 00042 /* Private variables ---------------------------------------------------------*/ 00043 /* Private constants ---------------------------------------------------------*/ 00044 /* Private macros ------------------------------------------------------------*/ 00045 /* Private function prototypes -----------------------------------------------*/ 00046 00047 /* Exported functions --------------------------------------------------------*/ 00048 /** @addtogroup RNG_LL_Exported_Functions 00049 * @{ 00050 */ 00051 00052 /** @addtogroup RNG_LL_EF_Init 00053 * @{ 00054 */ 00055 00056 /** 00057 * @brief De-initialize RNG registers (Registers restored to their default values). 00058 * @param RNGx RNG Instance 00059 * @retval An ErrorStatus enumeration value: 00060 * - SUCCESS: RNG registers are de-initialized 00061 * - ERROR: not applicable 00062 */ 00063 ErrorStatus LL_RNG_DeInit(RNG_TypeDef *RNGx) 00064 { 00065 /* Check the parameters */ 00066 assert_param(IS_RNG_ALL_INSTANCE(RNGx)); 00067 #if !defined(RCC_AHB2_SUPPORT) 00068 /* Enable RNG reset state */ 00069 LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_RNG); 00070 00071 /* Release RNG from reset state */ 00072 LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_RNG); 00073 #else 00074 /* Enable RNG reset state */ 00075 LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_RNG); 00076 00077 /* Release RNG from reset state */ 00078 LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_RNG); 00079 #endif /* !RCC_AHB2_SUPPORT */ 00080 return (SUCCESS); 00081 } 00082 00083 /** 00084 * @} 00085 */ 00086 00087 /** 00088 * @} 00089 */ 00090 00091 /** 00092 * @} 00093 */ 00094 00095 #endif /* RNG */ 00096 00097 /** 00098 * @} 00099 */ 00100 00101 #endif /* USE_FULL_LL_DRIVER */ 00102 00103 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00104