1 /**
2   ******************************************************************************
3   * @file    stm32f2xx_hal_pwr_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of PWR HAL Extension module.
6   ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2017 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 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F2xx_HAL_PWR_EX_H
22 #define __STM32F2xx_HAL_PWR_EX_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f2xx_hal_def.h"
30 
31 /** @addtogroup STM32F2xx_HAL_Driver
32   * @{
33   */
34 
35 /** @addtogroup PWREx
36   * @{
37   */
38 
39 /* Exported types ------------------------------------------------------------*/
40 /* Exported constants --------------------------------------------------------*/
41 /** @defgroup PWREx_Exported_Constants PWR Exported Constants
42   * @{
43   */
44 
45 /**
46   * @}
47   */
48 
49 /* Exported macro ------------------------------------------------------------*/
50 /** @defgroup PWREx_Exported_Constants PWR Exported Constants
51   *  @{
52   */
53 /**
54   * @}
55   */
56 
57 /* Exported functions --------------------------------------------------------*/
58 /** @addtogroup PWREx_Exported_Functions PWR Exported Functions
59   *  @{
60   */
61 
62 /** @addtogroup PWREx_Exported_Functions_Group1
63   * @{
64   */
65 void HAL_PWREx_EnableFlashPowerDown(void);
66 void HAL_PWREx_DisableFlashPowerDown(void);
67 HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void);
68 HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void);
69 /**
70   * @}
71   */
72 
73 /**
74   * @}
75   */
76 /* Private types -------------------------------------------------------------*/
77 /* Private variables ---------------------------------------------------------*/
78 /* Private constants ---------------------------------------------------------*/
79 /** @defgroup PWREx_Private_Constants PWR Private Constants
80   * @{
81   */
82 
83 /** @defgroup PWREx_register_alias_address PWR Register alias address
84   * @{
85   */
86 /* ------------- PWR registers bit address in the alias region ---------------*/
87 /* --- CR Register ---*/
88 /* Alias word address of FPDS bit */
89 #define FPDS_BIT_NUMBER          POSITION_VAL(PWR_CR_FPDS)
90 #define CR_FPDS_BB               (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (FPDS_BIT_NUMBER * 4U))
91 
92  /**
93   * @}
94   */
95 
96 /** @defgroup PWREx_CSR_register_alias PWR CSR Register alias address
97   * @{
98   */
99 /* --- CSR Register ---*/
100 /* Alias word address of BRE bit */
101 #define BRE_BIT_NUMBER   POSITION_VAL(PWR_CSR_BRE)
102 #define CSR_BRE_BB      (uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32U) + (BRE_BIT_NUMBER * 4U))
103 /**
104   * @}
105   */
106 
107 /**
108   * @}
109   */
110 
111 /* Private macros ------------------------------------------------------------*/
112 /** @defgroup PWREx_Private_Macros PWR Private Macros
113   * @{
114   */
115 
116 /** @defgroup PWREx_IS_PWR_Definitions PWR Private macros to check input parameters
117   * @{
118   */
119 
120 /**
121   * @}
122   */
123 
124 /**
125   * @}
126   */
127 
128 /**
129   * @}
130   */
131 
132 /**
133   * @}
134   */
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
140 
141 #endif /* __STM32F2xx_HAL_PWR_EX_H */
142 
143 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
144