mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Mon Oct 27 09:45:07 2014 +0000
Revision:
369:2e96f1b71984
Parent:
226:b062af740e40
Synchronized with git revision 2d1f64de28cfb25c0e602532e3ce5ad1d9accbed

Full URL: https://github.com/mbedmicro/mbed/commit/2d1f64de28cfb25c0e602532e3ce5ad1d9accbed/

CMSIS: NUCLEO_F401RE - Update STM32Cube driver

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 87:085cde657901 1 /**
mbed_official 87:085cde657901 2 ******************************************************************************
mbed_official 87:085cde657901 3 * @file stm32f4xx_hal_pwr.h
mbed_official 87:085cde657901 4 * @author MCD Application Team
mbed_official 369:2e96f1b71984 5 * @version V1.1.0
mbed_official 369:2e96f1b71984 6 * @date 19-June-2014
mbed_official 87:085cde657901 7 * @brief Header file of PWR HAL module.
mbed_official 87:085cde657901 8 ******************************************************************************
mbed_official 87:085cde657901 9 * @attention
mbed_official 87:085cde657901 10 *
mbed_official 87:085cde657901 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 87:085cde657901 12 *
mbed_official 87:085cde657901 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 87:085cde657901 14 * are permitted provided that the following conditions are met:
mbed_official 87:085cde657901 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 87:085cde657901 16 * this list of conditions and the following disclaimer.
mbed_official 87:085cde657901 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 87:085cde657901 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 87:085cde657901 19 * and/or other materials provided with the distribution.
mbed_official 87:085cde657901 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 87:085cde657901 21 * may be used to endorse or promote products derived from this software
mbed_official 87:085cde657901 22 * without specific prior written permission.
mbed_official 87:085cde657901 23 *
mbed_official 87:085cde657901 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 87:085cde657901 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 87:085cde657901 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 87:085cde657901 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 87:085cde657901 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 87:085cde657901 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 87:085cde657901 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 87:085cde657901 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 87:085cde657901 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 87:085cde657901 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 87:085cde657901 34 *
mbed_official 87:085cde657901 35 ******************************************************************************
mbed_official 87:085cde657901 36 */
mbed_official 87:085cde657901 37
mbed_official 87:085cde657901 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 87:085cde657901 39 #ifndef __STM32F4xx_HAL_PWR_H
mbed_official 87:085cde657901 40 #define __STM32F4xx_HAL_PWR_H
mbed_official 87:085cde657901 41
mbed_official 87:085cde657901 42 #ifdef __cplusplus
mbed_official 87:085cde657901 43 extern "C" {
mbed_official 87:085cde657901 44 #endif
mbed_official 87:085cde657901 45
mbed_official 87:085cde657901 46 /* Includes ------------------------------------------------------------------*/
mbed_official 87:085cde657901 47 #include "stm32f4xx_hal_def.h"
mbed_official 87:085cde657901 48
mbed_official 87:085cde657901 49 /** @addtogroup STM32F4xx_HAL_Driver
mbed_official 87:085cde657901 50 * @{
mbed_official 87:085cde657901 51 */
mbed_official 87:085cde657901 52
mbed_official 87:085cde657901 53 /** @addtogroup PWR
mbed_official 87:085cde657901 54 * @{
mbed_official 87:085cde657901 55 */
mbed_official 87:085cde657901 56
mbed_official 87:085cde657901 57 /* Exported types ------------------------------------------------------------*/
mbed_official 87:085cde657901 58 /**
mbed_official 87:085cde657901 59 * @brief PWR PVD configuration structure definition
mbed_official 87:085cde657901 60 */
mbed_official 87:085cde657901 61 typedef struct
mbed_official 87:085cde657901 62 {
mbed_official 226:b062af740e40 63 uint32_t PVDLevel; /*!< PVDLevel: Specifies the PVD detection level.
mbed_official 87:085cde657901 64 This parameter can be a value of @ref PWR_PVD_detection_level */
mbed_official 87:085cde657901 65
mbed_official 87:085cde657901 66 uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins.
mbed_official 87:085cde657901 67 This parameter can be a value of @ref PWR_PVD_Mode */
mbed_official 87:085cde657901 68 }PWR_PVDTypeDef;
mbed_official 87:085cde657901 69
mbed_official 87:085cde657901 70 /* Exported constants --------------------------------------------------------*/
mbed_official 87:085cde657901 71 /* ------------- PWR registers bit address in the alias region ---------------*/
mbed_official 87:085cde657901 72 #define PWR_OFFSET (PWR_BASE - PERIPH_BASE)
mbed_official 87:085cde657901 73
mbed_official 87:085cde657901 74 /* --- CR Register ---*/
mbed_official 87:085cde657901 75 /* Alias word address of DBP bit */
mbed_official 87:085cde657901 76 #define CR_OFFSET (PWR_OFFSET + 0x00)
mbed_official 87:085cde657901 77 #define DBP_BitNumber 0x08
mbed_official 87:085cde657901 78 #define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4))
mbed_official 87:085cde657901 79
mbed_official 87:085cde657901 80 /* Alias word address of PVDE bit */
mbed_official 87:085cde657901 81 #define PVDE_BitNumber 0x04
mbed_official 87:085cde657901 82 #define CR_PVDE_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PVDE_BitNumber * 4))
mbed_official 87:085cde657901 83
mbed_official 87:085cde657901 84 /* Alias word address of PMODE bit */
mbed_official 87:085cde657901 85 #define PMODE_BitNumber 0x0E
mbed_official 87:085cde657901 86 #define CR_PMODE_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (PMODE_BitNumber * 4))
mbed_official 87:085cde657901 87
mbed_official 87:085cde657901 88 /* --- CSR Register ---*/
mbed_official 87:085cde657901 89 /* Alias word address of EWUP bit */
mbed_official 87:085cde657901 90 #define CSR_OFFSET (PWR_OFFSET + 0x04)
mbed_official 87:085cde657901 91 #define EWUP_BitNumber 0x08
mbed_official 87:085cde657901 92 #define CSR_EWUP_BB (PERIPH_BB_BASE + (CSR_OFFSET * 32) + (EWUP_BitNumber * 4))
mbed_official 87:085cde657901 93
mbed_official 87:085cde657901 94 /** @defgroup PWR_Exported_Constants
mbed_official 87:085cde657901 95 * @{
mbed_official 87:085cde657901 96 */
mbed_official 87:085cde657901 97
mbed_official 87:085cde657901 98 /** @defgroup PWR_WakeUp_Pins
mbed_official 87:085cde657901 99 * @{
mbed_official 87:085cde657901 100 */
mbed_official 87:085cde657901 101
mbed_official 87:085cde657901 102 #define PWR_WAKEUP_PIN1 PWR_CSR_EWUP
mbed_official 87:085cde657901 103 #define IS_PWR_WAKEUP_PIN(PIN) ((PIN) == PWR_WAKEUP_PIN1)
mbed_official 87:085cde657901 104 /**
mbed_official 87:085cde657901 105 * @}
mbed_official 87:085cde657901 106 */
mbed_official 87:085cde657901 107
mbed_official 87:085cde657901 108 /** @defgroup PWR_PVD_detection_level
mbed_official 87:085cde657901 109 * @{
mbed_official 87:085cde657901 110 */
mbed_official 87:085cde657901 111 #define PWR_PVDLEVEL_0 PWR_CR_PLS_LEV0
mbed_official 87:085cde657901 112 #define PWR_PVDLEVEL_1 PWR_CR_PLS_LEV1
mbed_official 87:085cde657901 113 #define PWR_PVDLEVEL_2 PWR_CR_PLS_LEV2
mbed_official 87:085cde657901 114 #define PWR_PVDLEVEL_3 PWR_CR_PLS_LEV3
mbed_official 87:085cde657901 115 #define PWR_PVDLEVEL_4 PWR_CR_PLS_LEV4
mbed_official 87:085cde657901 116 #define PWR_PVDLEVEL_5 PWR_CR_PLS_LEV5
mbed_official 87:085cde657901 117 #define PWR_PVDLEVEL_6 PWR_CR_PLS_LEV6
mbed_official 87:085cde657901 118 #define PWR_PVDLEVEL_7 PWR_CR_PLS_LEV7
mbed_official 87:085cde657901 119 #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \
mbed_official 87:085cde657901 120 ((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \
mbed_official 87:085cde657901 121 ((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \
mbed_official 87:085cde657901 122 ((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7))
mbed_official 87:085cde657901 123 /**
mbed_official 87:085cde657901 124 * @}
mbed_official 87:085cde657901 125 */
mbed_official 87:085cde657901 126
mbed_official 87:085cde657901 127 /** @defgroup PWR_PVD_Mode
mbed_official 87:085cde657901 128 * @{
mbed_official 87:085cde657901 129 */
mbed_official 87:085cde657901 130 #define PWR_MODE_EVT ((uint32_t)0x00000000) /*!< No Interrupt */
mbed_official 87:085cde657901 131 #define PWR_MODE_IT_RISING ((uint32_t)0x00000001) /*!< External Interrupt Mode with Rising edge trigger detection */
mbed_official 87:085cde657901 132 #define PWR_MODE_IT_FALLING ((uint32_t)0x00000002) /*!< External Interrupt Mode with Falling edge trigger detection */
mbed_official 87:085cde657901 133 #define PWR_MODE_IT_RISING_FALLING ((uint32_t)0x00000003) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
mbed_official 87:085cde657901 134 #define IS_PWR_PVD_MODE(MODE) (((MODE) == PWR_MODE_EVT) || ((MODE) == PWR_MODE_IT_RISING)|| \
mbed_official 87:085cde657901 135 ((MODE) == PWR_MODE_IT_FALLING) || ((MODE) == PWR_MODE_IT_RISING_FALLING))
mbed_official 87:085cde657901 136 /**
mbed_official 87:085cde657901 137 * @}
mbed_official 87:085cde657901 138 */
mbed_official 87:085cde657901 139
mbed_official 87:085cde657901 140 /** @defgroup PWR_Regulator_state_in_STOP_mode
mbed_official 87:085cde657901 141 * @{
mbed_official 87:085cde657901 142 */
mbed_official 87:085cde657901 143 #define PWR_MAINREGULATOR_ON ((uint32_t)0x00000000)
mbed_official 87:085cde657901 144 #define PWR_LOWPOWERREGULATOR_ON PWR_CR_LPDS
mbed_official 87:085cde657901 145
mbed_official 87:085cde657901 146 #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \
mbed_official 87:085cde657901 147 ((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))
mbed_official 87:085cde657901 148 /**
mbed_official 87:085cde657901 149 * @}
mbed_official 87:085cde657901 150 */
mbed_official 87:085cde657901 151
mbed_official 87:085cde657901 152 /** @defgroup PWR_SLEEP_mode_entry
mbed_official 87:085cde657901 153 * @{
mbed_official 87:085cde657901 154 */
mbed_official 87:085cde657901 155 #define PWR_SLEEPENTRY_WFI ((uint8_t)0x01)
mbed_official 87:085cde657901 156 #define PWR_SLEEPENTRY_WFE ((uint8_t)0x02)
mbed_official 87:085cde657901 157 #define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))
mbed_official 87:085cde657901 158 /**
mbed_official 87:085cde657901 159 * @}
mbed_official 87:085cde657901 160 */
mbed_official 87:085cde657901 161
mbed_official 87:085cde657901 162 /** @defgroup PWR_STOP_mode_entry
mbed_official 87:085cde657901 163 * @{
mbed_official 87:085cde657901 164 */
mbed_official 87:085cde657901 165 #define PWR_STOPENTRY_WFI ((uint8_t)0x01)
mbed_official 87:085cde657901 166 #define PWR_STOPENTRY_WFE ((uint8_t)0x02)
mbed_official 87:085cde657901 167 #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE))
mbed_official 87:085cde657901 168 /**
mbed_official 87:085cde657901 169 * @}
mbed_official 87:085cde657901 170 */
mbed_official 87:085cde657901 171
mbed_official 87:085cde657901 172 /** @defgroup PWR_Regulator_Voltage_Scale
mbed_official 87:085cde657901 173 * @{
mbed_official 87:085cde657901 174 */
mbed_official 87:085cde657901 175 #define PWR_REGULATOR_VOLTAGE_SCALE1 ((uint32_t)0x0000C000)
mbed_official 87:085cde657901 176 #define PWR_REGULATOR_VOLTAGE_SCALE2 ((uint32_t)0x00008000)
mbed_official 87:085cde657901 177 #define PWR_REGULATOR_VOLTAGE_SCALE3 ((uint32_t)0x00004000)
mbed_official 87:085cde657901 178 #define IS_PWR_REGULATOR_VOLTAGE(VOLTAGE) (((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE1) || \
mbed_official 87:085cde657901 179 ((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE2) || \
mbed_official 87:085cde657901 180 ((VOLTAGE) == PWR_REGULATOR_VOLTAGE_SCALE3))
mbed_official 87:085cde657901 181 /**
mbed_official 87:085cde657901 182 * @}
mbed_official 87:085cde657901 183 */
mbed_official 87:085cde657901 184
mbed_official 87:085cde657901 185 /** @defgroup PWR_Flag
mbed_official 87:085cde657901 186 * @{
mbed_official 87:085cde657901 187 */
mbed_official 87:085cde657901 188 #define PWR_FLAG_WU PWR_CSR_WUF
mbed_official 87:085cde657901 189 #define PWR_FLAG_SB PWR_CSR_SBF
mbed_official 87:085cde657901 190 #define PWR_FLAG_PVDO PWR_CSR_PVDO
mbed_official 87:085cde657901 191 #define PWR_FLAG_BRR PWR_CSR_BRR
mbed_official 87:085cde657901 192 #define PWR_FLAG_VOSRDY PWR_CSR_VOSRDY
mbed_official 87:085cde657901 193
mbed_official 87:085cde657901 194 /**
mbed_official 87:085cde657901 195 * @}
mbed_official 87:085cde657901 196 */
mbed_official 87:085cde657901 197
mbed_official 87:085cde657901 198 /**
mbed_official 87:085cde657901 199 * @}
mbed_official 87:085cde657901 200 */
mbed_official 87:085cde657901 201
mbed_official 87:085cde657901 202 /* Exported macro ------------------------------------------------------------*/
mbed_official 87:085cde657901 203
mbed_official 87:085cde657901 204 /** @brief macros configure the main internal regulator output voltage.
mbed_official 87:085cde657901 205 * @param __REGULATOR__: specifies the regulator output voltage to achieve
mbed_official 87:085cde657901 206 * a tradeoff between performance and power consumption when the device does
mbed_official 87:085cde657901 207 * not operate at the maximum frequency (refer to the datasheets for more details).
mbed_official 87:085cde657901 208 * This parameter can be one of the following values:
mbed_official 87:085cde657901 209 * @arg PWR_REGULATOR_VOLTAGE_SCALE1: Regulator voltage output Scale 1 mode
mbed_official 87:085cde657901 210 * @arg PWR_REGULATOR_VOLTAGE_SCALE2: Regulator voltage output Scale 2 mode
mbed_official 87:085cde657901 211 * @arg PWR_REGULATOR_VOLTAGE_SCALE3: Regulator voltage output Scale 3 mode
mbed_official 87:085cde657901 212 * @retval None
mbed_official 87:085cde657901 213 */
mbed_official 87:085cde657901 214 #define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__) (MODIFY_REG(PWR->CR, PWR_CR_VOS, (__REGULATOR__)))
mbed_official 87:085cde657901 215
mbed_official 87:085cde657901 216 /** @brief Check PWR flag is set or not.
mbed_official 87:085cde657901 217 * @param __FLAG__: specifies the flag to check.
mbed_official 87:085cde657901 218 * This parameter can be one of the following values:
mbed_official 87:085cde657901 219 * @arg PWR_FLAG_WU: Wake Up flag. This flag indicates that a wakeup event
mbed_official 87:085cde657901 220 * was received from the WKUP pin or from the RTC alarm (Alarm A
mbed_official 87:085cde657901 221 * or Alarm B), RTC Tamper event, RTC TimeStamp event or RTC Wakeup.
mbed_official 87:085cde657901 222 * An additional wakeup event is detected if the WKUP pin is enabled
mbed_official 87:085cde657901 223 * (by setting the EWUP bit) when the WKUP pin level is already high.
mbed_official 87:085cde657901 224 * @arg PWR_FLAG_SB: StandBy flag. This flag indicates that the system was
mbed_official 87:085cde657901 225 * resumed from StandBy mode.
mbed_official 87:085cde657901 226 * @arg PWR_FLAG_PVDO: PVD Output. This flag is valid only if PVD is enabled
mbed_official 87:085cde657901 227 * by the HAL_PWR_EnablePVD() function. The PVD is stopped by Standby mode
mbed_official 87:085cde657901 228 * For this reason, this bit is equal to 0 after Standby or reset
mbed_official 87:085cde657901 229 * until the PVDE bit is set.
mbed_official 87:085cde657901 230 * @arg PWR_FLAG_BRR: Backup regulator ready flag. This bit is not reset
mbed_official 87:085cde657901 231 * when the device wakes up from Standby mode or by a system reset
mbed_official 87:085cde657901 232 * or power reset.
mbed_official 87:085cde657901 233 * @arg PWR_FLAG_VOSRDY: This flag indicates that the Regulator voltage
mbed_official 87:085cde657901 234 * scaling output selection is ready.
mbed_official 87:085cde657901 235 * @retval The new state of __FLAG__ (TRUE or FALSE).
mbed_official 87:085cde657901 236 */
mbed_official 87:085cde657901 237 #define __HAL_PWR_GET_FLAG(__FLAG__) ((PWR->CSR & (__FLAG__)) == (__FLAG__))
mbed_official 87:085cde657901 238
mbed_official 87:085cde657901 239 /** @brief Clear the PWR's pending flags.
mbed_official 87:085cde657901 240 * @param __FLAG__: specifies the flag to clear.
mbed_official 87:085cde657901 241 * This parameter can be one of the following values:
mbed_official 87:085cde657901 242 * @arg PWR_FLAG_WU: Wake Up flag
mbed_official 87:085cde657901 243 * @arg PWR_FLAG_SB: StandBy flag
mbed_official 87:085cde657901 244 */
mbed_official 87:085cde657901 245 #define __HAL_PWR_CLEAR_FLAG(__FLAG__) (PWR->CR |= (__FLAG__) << 2)
mbed_official 87:085cde657901 246
mbed_official 87:085cde657901 247 #define PWR_EXTI_LINE_PVD ((uint32_t)0x00010000) /*!< External interrupt line 16 Connected to the PVD EXTI Line */
mbed_official 87:085cde657901 248 /**
mbed_official 87:085cde657901 249 * @brief Enable the PVD Exti Line.
mbed_official 87:085cde657901 250 * @param __EXTILINE__: specifies the PVD Exti sources to be enabled.
mbed_official 87:085cde657901 251 * This parameter can be:
mbed_official 87:085cde657901 252 * @arg PWR_EXTI_LINE_PVD
mbed_official 87:085cde657901 253 * @retval None.
mbed_official 87:085cde657901 254 */
mbed_official 87:085cde657901 255 #define __HAL_PVD_EXTI_ENABLE_IT(__EXTILINE__) (EXTI->IMR |= (__EXTILINE__))
mbed_official 87:085cde657901 256
mbed_official 87:085cde657901 257 /**
mbed_official 87:085cde657901 258 * @brief Disable the PVD EXTI Line.
mbed_official 87:085cde657901 259 * @param __EXTILINE__: specifies the PVD EXTI sources to be disabled.
mbed_official 87:085cde657901 260 * This parameter can be:
mbed_official 87:085cde657901 261 * @arg PWR_EXTI_LINE_PVD
mbed_official 87:085cde657901 262 * @retval None.
mbed_official 87:085cde657901 263 */
mbed_official 87:085cde657901 264 #define __HAL_PVD_EXTI_DISABLE_IT(__EXTILINE__) (EXTI->IMR &= ~(__EXTILINE__))
mbed_official 87:085cde657901 265
mbed_official 87:085cde657901 266 /**
mbed_official 87:085cde657901 267 * @brief checks whether the specified PVD Exti interrupt flag is set or not.
mbed_official 87:085cde657901 268 * @param __EXTILINE__: specifies the PVD Exti sources to be cleared.
mbed_official 87:085cde657901 269 * This parameter can be:
mbed_official 87:085cde657901 270 * @arg PWR_EXTI_LINE_PVD
mbed_official 87:085cde657901 271 * @retval EXTI PVD Line Status.
mbed_official 87:085cde657901 272 */
mbed_official 87:085cde657901 273 #define __HAL_PVD_EXTI_GET_FLAG(__EXTILINE__) (EXTI->PR & (__EXTILINE__))
mbed_official 87:085cde657901 274
mbed_official 87:085cde657901 275 /**
mbed_official 87:085cde657901 276 * @brief Clear the PVD Exti flag.
mbed_official 87:085cde657901 277 * @param __EXTILINE__: specifies the PVD Exti sources to be cleared.
mbed_official 87:085cde657901 278 * This parameter can be:
mbed_official 87:085cde657901 279 * @arg PWR_EXTI_LINE_PVD
mbed_official 87:085cde657901 280 * @retval None.
mbed_official 87:085cde657901 281 */
mbed_official 87:085cde657901 282 #define __HAL_PVD_EXTI_CLEAR_FLAG(__EXTILINE__) (EXTI->PR = (__EXTILINE__))
mbed_official 87:085cde657901 283
mbed_official 369:2e96f1b71984 284 /**
mbed_official 369:2e96f1b71984 285 * @brief Generates a Software interrupt on selected EXTI line.
mbed_official 369:2e96f1b71984 286 * @param __EXTILINE__: specifies the PVD EXTI sources to be disabled.
mbed_official 369:2e96f1b71984 287 * This parameter can be:
mbed_official 369:2e96f1b71984 288 * @arg PWR_EXTI_LINE_PVD
mbed_official 369:2e96f1b71984 289 * @retval None
mbed_official 369:2e96f1b71984 290 */
mbed_official 369:2e96f1b71984 291 #define __HAL_PVD_EXTI_GENERATE_SWIT(__EXTI_LINE__) (EXTI->SWIER |= (__EXTI_LINE__))
mbed_official 87:085cde657901 292
mbed_official 87:085cde657901 293 /* Include PWR HAL Extension module */
mbed_official 87:085cde657901 294 #include "stm32f4xx_hal_pwr_ex.h"
mbed_official 87:085cde657901 295
mbed_official 87:085cde657901 296 /* Exported functions --------------------------------------------------------*/
mbed_official 87:085cde657901 297
mbed_official 369:2e96f1b71984 298 /* Initialization and de-initialization functions *****************************/
mbed_official 369:2e96f1b71984 299 void HAL_PWR_DeInit(void);
mbed_official 369:2e96f1b71984 300 void HAL_PWR_EnableBkUpAccess(void);
mbed_official 369:2e96f1b71984 301 void HAL_PWR_DisableBkUpAccess(void);
mbed_official 369:2e96f1b71984 302
mbed_official 369:2e96f1b71984 303 /* Peripheral Control functions **********************************************/
mbed_official 369:2e96f1b71984 304 /* PVD configuration */
mbed_official 369:2e96f1b71984 305 void HAL_PWR_PVDConfig(PWR_PVDTypeDef *sConfigPVD);
mbed_official 369:2e96f1b71984 306 void HAL_PWR_EnablePVD(void);
mbed_official 369:2e96f1b71984 307 void HAL_PWR_DisablePVD(void);
mbed_official 87:085cde657901 308
mbed_official 369:2e96f1b71984 309 /* WakeUp pins configuration */
mbed_official 369:2e96f1b71984 310 void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinx);
mbed_official 369:2e96f1b71984 311 void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx);
mbed_official 87:085cde657901 312
mbed_official 369:2e96f1b71984 313 /* Low Power modes entry */
mbed_official 369:2e96f1b71984 314 void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry);
mbed_official 369:2e96f1b71984 315 void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry);
mbed_official 369:2e96f1b71984 316 void HAL_PWR_EnterSTANDBYMode(void);
mbed_official 87:085cde657901 317
mbed_official 369:2e96f1b71984 318 void HAL_PWR_PVD_IRQHandler(void);
mbed_official 106:ced8cbb51063 319 void HAL_PWR_PVDCallback(void);
mbed_official 87:085cde657901 320
mbed_official 87:085cde657901 321
mbed_official 87:085cde657901 322 /**
mbed_official 87:085cde657901 323 * @}
mbed_official 87:085cde657901 324 */
mbed_official 87:085cde657901 325
mbed_official 87:085cde657901 326 /**
mbed_official 87:085cde657901 327 * @}
mbed_official 87:085cde657901 328 */
mbed_official 87:085cde657901 329
mbed_official 87:085cde657901 330 #ifdef __cplusplus
mbed_official 87:085cde657901 331 }
mbed_official 87:085cde657901 332 #endif
mbed_official 87:085cde657901 333
mbed_official 87:085cde657901 334
mbed_official 87:085cde657901 335 #endif /* __STM32F4xx_HAL_PWR_H */
mbed_official 87:085cde657901 336
mbed_official 87:085cde657901 337 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/