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   * Copyright (c) 2017 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef __STM32F2xx_HAL_PWR_EX_H
21 #define __STM32F2xx_HAL_PWR_EX_H
22 
23 #ifdef __cplusplus
24  extern "C" {
25 #endif
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32f2xx_hal_def.h"
29 
30 /** @addtogroup STM32F2xx_HAL_Driver
31   * @{
32   */
33 
34 /** @addtogroup PWREx
35   * @{
36   */
37 
38 /* Exported types ------------------------------------------------------------*/
39 /* Exported constants --------------------------------------------------------*/
40 /** @defgroup PWREx_Exported_Constants PWR Exported Constants
41   * @{
42   */
43 
44 /**
45   * @}
46   */
47 
48 /* Exported macro ------------------------------------------------------------*/
49 /** @defgroup PWREx_Exported_Constants PWR Exported Constants
50   *  @{
51   */
52 /**
53   * @}
54   */
55 
56 /* Exported functions --------------------------------------------------------*/
57 /** @addtogroup PWREx_Exported_Functions PWR Exported Functions
58   *  @{
59   */
60 
61 /** @addtogroup PWREx_Exported_Functions_Group1
62   * @{
63   */
64 void HAL_PWREx_EnableFlashPowerDown(void);
65 void HAL_PWREx_DisableFlashPowerDown(void);
66 HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void);
67 HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void);
68 /**
69   * @}
70   */
71 
72 /**
73   * @}
74   */
75 /* Private types -------------------------------------------------------------*/
76 /* Private variables ---------------------------------------------------------*/
77 /* Private constants ---------------------------------------------------------*/
78 /** @defgroup PWREx_Private_Constants PWR Private Constants
79   * @{
80   */
81 
82 /** @defgroup PWREx_register_alias_address PWR Register alias address
83   * @{
84   */
85 /* ------------- PWR registers bit address in the alias region ---------------*/
86 /* --- CR Register ---*/
87 /* Alias word address of FPDS bit */
88 #define FPDS_BIT_NUMBER          POSITION_VAL(PWR_CR_FPDS)
89 #define CR_FPDS_BB               (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (FPDS_BIT_NUMBER * 4U))
90 
91  /**
92   * @}
93   */
94 
95 /** @defgroup PWREx_CSR_register_alias PWR CSR Register alias address
96   * @{
97   */
98 /* --- CSR Register ---*/
99 /* Alias word address of BRE bit */
100 #define BRE_BIT_NUMBER   POSITION_VAL(PWR_CSR_BRE)
101 #define CSR_BRE_BB      (uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32U) + (BRE_BIT_NUMBER * 4U))
102 /**
103   * @}
104   */
105 
106 /**
107   * @}
108   */
109 
110 /* Private macros ------------------------------------------------------------*/
111 /** @defgroup PWREx_Private_Macros PWR Private Macros
112   * @{
113   */
114 
115 /** @defgroup PWREx_IS_PWR_Definitions PWR Private macros to check input parameters
116   * @{
117   */
118 
119 /**
120   * @}
121   */
122 
123 /**
124   * @}
125   */
126 
127 /**
128   * @}
129   */
130 
131 /**
132   * @}
133   */
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 
140 #endif /* __STM32F2xx_HAL_PWR_EX_H */
141