Updated and Validated
[betaflight.git] / lib / main / STM32F7 / Drivers / STM32F7xx_HAL_Driver / Src / stm32f7xx_ll_pwr.c
blob45c61754eb37fbe503946d76375538197d4fc172
1 /**
2 ******************************************************************************
3 * @file stm32f7xx_ll_pwr.c
4 * @author MCD Application Team
5 * @brief PWR LL module driver.
6 ******************************************************************************
7 * @attention
9 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10 * All rights reserved.</center></h2>
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
17 ******************************************************************************
19 #if defined(USE_FULL_LL_DRIVER)
21 /* Includes ------------------------------------------------------------------*/
22 #include "stm32f7xx_ll_pwr.h"
23 #include "stm32f7xx_ll_bus.h"
25 /** @addtogroup STM32F7xx_LL_Driver
26 * @{
29 #if defined(PWR)
31 /** @defgroup PWR_LL PWR
32 * @{
35 /* Private types -------------------------------------------------------------*/
36 /* Private variables ---------------------------------------------------------*/
37 /* Private constants ---------------------------------------------------------*/
38 /* Private macros ------------------------------------------------------------*/
39 /* Private function prototypes -----------------------------------------------*/
41 /* Exported functions --------------------------------------------------------*/
42 /** @addtogroup PWR_LL_Exported_Functions
43 * @{
46 /** @addtogroup PWR_LL_EF_Init
47 * @{
50 /**
51 * @brief De-initialize the PWR registers to their default reset values.
52 * @retval An ErrorStatus enumeration value:
53 * - SUCCESS: PWR registers are de-initialized
54 * - ERROR: not applicable
56 ErrorStatus LL_PWR_DeInit(void)
58 /* Force reset of PWR clock */
59 LL_APB1_GRP1_ForceReset(LL_APB1_GRP1_PERIPH_PWR);
61 /* Release reset of PWR clock */
62 LL_APB1_GRP1_ReleaseReset(LL_APB1_GRP1_PERIPH_PWR);
64 WRITE_REG(PWR->CR2, (PWR_CR2_CWUPF1 | PWR_CR2_CWUPF2 | PWR_CR2_CWUPF3 | PWR_CR2_CWUPF4 | PWR_CR2_CWUPF5 | PWR_CR2_CWUPF6));
66 return SUCCESS;
69 /**
70 * @}
73 /**
74 * @}
77 /**
78 * @}
80 #endif /* defined(PWR) */
81 /**
82 * @}
85 #endif /* USE_FULL_LL_DRIVER */
87 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/