stm32f4xx_ll_rng.c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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>&copy; 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. /* Includes ------------------------------------------------------------------*/
  21. #include "stm32f4xx_ll_rng.h"
  22. #include "stm32f4xx_ll_bus.h"
  23. #ifdef USE_FULL_ASSERT
  24. #include "stm32_assert.h"
  25. #else
  26. #define assert_param(expr) ((void)0U)
  27. #endif
  28. /** @addtogroup STM32F4xx_LL_Driver
  29. * @{
  30. */
  31. #if defined (RNG)
  32. /** @addtogroup RNG_LL
  33. * @{
  34. */
  35. /* Private types -------------------------------------------------------------*/
  36. /* Private variables ---------------------------------------------------------*/
  37. /* Private constants ---------------------------------------------------------*/
  38. /* Private macros ------------------------------------------------------------*/
  39. /* Private function prototypes -----------------------------------------------*/
  40. /* Exported functions --------------------------------------------------------*/
  41. /** @addtogroup RNG_LL_Exported_Functions
  42. * @{
  43. */
  44. /** @addtogroup RNG_LL_EF_Init
  45. * @{
  46. */
  47. /**
  48. * @brief De-initialize RNG registers (Registers restored to their default values).
  49. * @param RNGx RNG Instance
  50. * @retval An ErrorStatus enumeration value:
  51. * - SUCCESS: RNG registers are de-initialized
  52. * - ERROR: not applicable
  53. */
  54. ErrorStatus LL_RNG_DeInit(RNG_TypeDef *RNGx)
  55. {
  56. /* Check the parameters */
  57. assert_param(IS_RNG_ALL_INSTANCE(RNGx));
  58. #if !defined (RCC_AHB2_SUPPORT)
  59. /* Enable RNG reset state */
  60. LL_AHB1_GRP1_ForceReset(LL_AHB1_GRP1_PERIPH_RNG);
  61. /* Release RNG from reset state */
  62. LL_AHB1_GRP1_ReleaseReset(LL_AHB1_GRP1_PERIPH_RNG);
  63. #else
  64. /* Enable RNG reset state */
  65. LL_AHB2_GRP1_ForceReset(LL_AHB2_GRP1_PERIPH_RNG);
  66. /* Release RNG from reset state */
  67. LL_AHB2_GRP1_ReleaseReset(LL_AHB2_GRP1_PERIPH_RNG);
  68. #endif
  69. return (SUCCESS);
  70. }
  71. /**
  72. * @}
  73. */
  74. /**
  75. * @}
  76. */
  77. /**
  78. * @}
  79. */
  80. #endif /* RNG */
  81. /**
  82. * @}
  83. */
  84. #endif /* USE_FULL_LL_DRIVER */
  85. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/