mbed library sources

Dependents:   Marvino mbot

Fork of mbed-src by mbed official

Committer:
jaerts
Date:
Tue Dec 22 13:22:16 2015 +0000
Revision:
637:ed69428d4850
Parent:
610:813dcc80987e
Add very shady LPC1768 CAN Filter implementation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 610:813dcc80987e 1 /**
mbed_official 610:813dcc80987e 2 ******************************************************************************
mbed_official 610:813dcc80987e 3 * @file stm32l4xx_hal_pwr_ex.h
mbed_official 610:813dcc80987e 4 * @author MCD Application Team
mbed_official 610:813dcc80987e 5 * @version V1.0.0
mbed_official 610:813dcc80987e 6 * @date 26-June-2015
mbed_official 610:813dcc80987e 7 * @brief Header file of PWR HAL Extended module.
mbed_official 610:813dcc80987e 8 ******************************************************************************
mbed_official 610:813dcc80987e 9 * @attention
mbed_official 610:813dcc80987e 10 *
mbed_official 610:813dcc80987e 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 610:813dcc80987e 12 *
mbed_official 610:813dcc80987e 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 610:813dcc80987e 14 * are permitted provided that the following conditions are met:
mbed_official 610:813dcc80987e 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 610:813dcc80987e 16 * this list of conditions and the following disclaimer.
mbed_official 610:813dcc80987e 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 610:813dcc80987e 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 610:813dcc80987e 19 * and/or other materials provided with the distribution.
mbed_official 610:813dcc80987e 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 610:813dcc80987e 21 * may be used to endorse or promote products derived from this software
mbed_official 610:813dcc80987e 22 * without specific prior written permission.
mbed_official 610:813dcc80987e 23 *
mbed_official 610:813dcc80987e 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 610:813dcc80987e 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 610:813dcc80987e 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 610:813dcc80987e 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 610:813dcc80987e 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 610:813dcc80987e 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 610:813dcc80987e 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 610:813dcc80987e 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 610:813dcc80987e 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 610:813dcc80987e 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 610:813dcc80987e 34 *
mbed_official 610:813dcc80987e 35 ******************************************************************************
mbed_official 610:813dcc80987e 36 */
mbed_official 610:813dcc80987e 37
mbed_official 610:813dcc80987e 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 610:813dcc80987e 39 #ifndef __STM32L4xx_HAL_PWR_EX_H
mbed_official 610:813dcc80987e 40 #define __STM32L4xx_HAL_PWR_EX_H
mbed_official 610:813dcc80987e 41
mbed_official 610:813dcc80987e 42 #ifdef __cplusplus
mbed_official 610:813dcc80987e 43 extern "C" {
mbed_official 610:813dcc80987e 44 #endif
mbed_official 610:813dcc80987e 45
mbed_official 610:813dcc80987e 46 /* Includes ------------------------------------------------------------------*/
mbed_official 610:813dcc80987e 47 #include "stm32l4xx_hal_def.h"
mbed_official 610:813dcc80987e 48
mbed_official 610:813dcc80987e 49 /** @addtogroup STM32L4xx_HAL_Driver
mbed_official 610:813dcc80987e 50 * @{
mbed_official 610:813dcc80987e 51 */
mbed_official 610:813dcc80987e 52
mbed_official 610:813dcc80987e 53 /** @addtogroup PWREx
mbed_official 610:813dcc80987e 54 * @{
mbed_official 610:813dcc80987e 55 */
mbed_official 610:813dcc80987e 56
mbed_official 610:813dcc80987e 57
mbed_official 610:813dcc80987e 58 /* Exported types ------------------------------------------------------------*/
mbed_official 610:813dcc80987e 59
mbed_official 610:813dcc80987e 60 /** @defgroup PWREx_Exported_Types PWR Extended Exported Types
mbed_official 610:813dcc80987e 61 * @{
mbed_official 610:813dcc80987e 62 */
mbed_official 610:813dcc80987e 63
mbed_official 610:813dcc80987e 64 /**
mbed_official 610:813dcc80987e 65 * @brief PWR PVM configuration structure definition
mbed_official 610:813dcc80987e 66 */
mbed_official 610:813dcc80987e 67 typedef struct
mbed_official 610:813dcc80987e 68 {
mbed_official 610:813dcc80987e 69 uint32_t PVMType; /*!< PVMType: Specifies which voltage is monitored and against which threshold.
mbed_official 610:813dcc80987e 70 This parameter can be a value of @ref PWREx_PVM_Type.
mbed_official 610:813dcc80987e 71 @arg PWR_PVM_1: Peripheral Voltage Monitoring 1 enable: VDDUSB versus 1.2 V (applicable when USB feature is supported).
mbed_official 610:813dcc80987e 72 @arg PWR_PVM_2: Peripheral Voltage Monitoring 2 enable: VDDIO2 versus 0.9 V (applicable when VDDIO2 is present on device).
mbed_official 610:813dcc80987e 73 @arg PWR_PVM_3: Peripheral Voltage Monitoring 3 enable: VDDA versus 1.62 V.
mbed_official 610:813dcc80987e 74 @arg PWR_PVM_4: Peripheral Voltage Monitoring 4 enable: VDDA versus 2.2 V. */
mbed_official 610:813dcc80987e 75
mbed_official 610:813dcc80987e 76 uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins.
mbed_official 610:813dcc80987e 77 This parameter can be a value of @ref PWREx_PVM_Mode. */
mbed_official 610:813dcc80987e 78 }PWR_PVMTypeDef;
mbed_official 610:813dcc80987e 79
mbed_official 610:813dcc80987e 80 /**
mbed_official 610:813dcc80987e 81 * @}
mbed_official 610:813dcc80987e 82 */
mbed_official 610:813dcc80987e 83
mbed_official 610:813dcc80987e 84 /* Exported constants --------------------------------------------------------*/
mbed_official 610:813dcc80987e 85
mbed_official 610:813dcc80987e 86 /** @defgroup PWREx_Exported_Constants PWR Extended Exported Constants
mbed_official 610:813dcc80987e 87 * @{
mbed_official 610:813dcc80987e 88 */
mbed_official 610:813dcc80987e 89
mbed_official 610:813dcc80987e 90 /** @defgroup PWREx_WUP_Polarity Shift to apply to retrieve polarity information from PWR_WAKEUP_PINy_xxx constants
mbed_official 610:813dcc80987e 91 * @{
mbed_official 610:813dcc80987e 92 */
mbed_official 610:813dcc80987e 93 #define PWR_WUP_POLARITY_SHIFT 0x05 /*!< Internal constant used to retrieve wakeup pin polariry */
mbed_official 610:813dcc80987e 94 /**
mbed_official 610:813dcc80987e 95 * @}
mbed_official 610:813dcc80987e 96 */
mbed_official 610:813dcc80987e 97
mbed_official 610:813dcc80987e 98
mbed_official 610:813dcc80987e 99 /** @defgroup PWREx_WakeUp_Pins PWR wake-up pins
mbed_official 610:813dcc80987e 100 * @{
mbed_official 610:813dcc80987e 101 */
mbed_official 610:813dcc80987e 102 #define PWR_WAKEUP_PIN1 PWR_CR3_EWUP1 /*!< Wakeup pin 1 (with high level polarity) */
mbed_official 610:813dcc80987e 103 #define PWR_WAKEUP_PIN2 PWR_CR3_EWUP2 /*!< Wakeup pin 2 (with high level polarity) */
mbed_official 610:813dcc80987e 104 #define PWR_WAKEUP_PIN3 PWR_CR3_EWUP3 /*!< Wakeup pin 3 (with high level polarity) */
mbed_official 610:813dcc80987e 105 #define PWR_WAKEUP_PIN4 PWR_CR3_EWUP4 /*!< Wakeup pin 4 (with high level polarity) */
mbed_official 610:813dcc80987e 106 #define PWR_WAKEUP_PIN5 PWR_CR3_EWUP5 /*!< Wakeup pin 5 (with high level polarity) */
mbed_official 610:813dcc80987e 107 #define PWR_WAKEUP_PIN1_HIGH PWR_CR3_EWUP1 /*!< Wakeup pin 1 (with high level polarity) */
mbed_official 610:813dcc80987e 108 #define PWR_WAKEUP_PIN2_HIGH PWR_CR3_EWUP2 /*!< Wakeup pin 2 (with high level polarity) */
mbed_official 610:813dcc80987e 109 #define PWR_WAKEUP_PIN3_HIGH PWR_CR3_EWUP3 /*!< Wakeup pin 3 (with high level polarity) */
mbed_official 610:813dcc80987e 110 #define PWR_WAKEUP_PIN4_HIGH PWR_CR3_EWUP4 /*!< Wakeup pin 4 (with high level polarity) */
mbed_official 610:813dcc80987e 111 #define PWR_WAKEUP_PIN5_HIGH PWR_CR3_EWUP5 /*!< Wakeup pin 5 (with high level polarity) */
mbed_official 610:813dcc80987e 112 #define PWR_WAKEUP_PIN1_LOW (uint32_t)((PWR_CR4_WP1<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP1) /*!< Wakeup pin 1 (with low level polarity) */
mbed_official 610:813dcc80987e 113 #define PWR_WAKEUP_PIN2_LOW (uint32_t)((PWR_CR4_WP2<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP2) /*!< Wakeup pin 2 (with low level polarity) */
mbed_official 610:813dcc80987e 114 #define PWR_WAKEUP_PIN3_LOW (uint32_t)((PWR_CR4_WP3<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP3) /*!< Wakeup pin 3 (with low level polarity) */
mbed_official 610:813dcc80987e 115 #define PWR_WAKEUP_PIN4_LOW (uint32_t)((PWR_CR4_WP4<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP4) /*!< Wakeup pin 4 (with low level polarity) */
mbed_official 610:813dcc80987e 116 #define PWR_WAKEUP_PIN5_LOW (uint32_t)((PWR_CR4_WP5<<PWR_WUP_POLARITY_SHIFT) | PWR_CR3_EWUP5) /*!< Wakeup pin 5 (with low level polarity) */
mbed_official 610:813dcc80987e 117 /**
mbed_official 610:813dcc80987e 118 * @}
mbed_official 610:813dcc80987e 119 */
mbed_official 610:813dcc80987e 120
mbed_official 610:813dcc80987e 121 /** @defgroup PWREx_PVM_Type Peripheral Voltage Monitoring type
mbed_official 610:813dcc80987e 122 * @{
mbed_official 610:813dcc80987e 123 */
mbed_official 610:813dcc80987e 124 #if defined(STM32L475xx) || defined(STM32L476xx) || defined (STM32L485xx) || defined(STM32L486xx)
mbed_official 610:813dcc80987e 125 #define PWR_PVM_1 PWR_CR2_PVME1 /*!< Peripheral Voltage Monitoring 1 enable: VDDUSB versus 1.2 V (applicable when USB feature is supported) */
mbed_official 610:813dcc80987e 126 #endif /* STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
mbed_official 610:813dcc80987e 127 #define PWR_PVM_2 PWR_CR2_PVME2 /*!< Peripheral Voltage Monitoring 2 enable: VDDIO2 versus 0.9 V (applicable when VDDIO2 is present on device) */
mbed_official 610:813dcc80987e 128 #define PWR_PVM_3 PWR_CR2_PVME3 /*!< Peripheral Voltage Monitoring 3 enable: VDDA versus 1.62 V */
mbed_official 610:813dcc80987e 129 #define PWR_PVM_4 PWR_CR2_PVME4 /*!< Peripheral Voltage Monitoring 4 enable: VDDA versus 2.2 V */
mbed_official 610:813dcc80987e 130 /**
mbed_official 610:813dcc80987e 131 * @}
mbed_official 610:813dcc80987e 132 */
mbed_official 610:813dcc80987e 133
mbed_official 610:813dcc80987e 134 /** @defgroup PWREx_PVM_Mode PWR PVM interrupt and event mode
mbed_official 610:813dcc80987e 135 * @{
mbed_official 610:813dcc80987e 136 */
mbed_official 610:813dcc80987e 137 #define PWR_PVM_MODE_NORMAL ((uint32_t)0x00000000) /*!< basic mode is used */
mbed_official 610:813dcc80987e 138 #define PWR_PVM_MODE_IT_RISING ((uint32_t)0x00010001) /*!< External Interrupt Mode with Rising edge trigger detection */
mbed_official 610:813dcc80987e 139 #define PWR_PVM_MODE_IT_FALLING ((uint32_t)0x00010002) /*!< External Interrupt Mode with Falling edge trigger detection */
mbed_official 610:813dcc80987e 140 #define PWR_PVM_MODE_IT_RISING_FALLING ((uint32_t)0x00010003) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
mbed_official 610:813dcc80987e 141 #define PWR_PVM_MODE_EVENT_RISING ((uint32_t)0x00020001) /*!< Event Mode with Rising edge trigger detection */
mbed_official 610:813dcc80987e 142 #define PWR_PVM_MODE_EVENT_FALLING ((uint32_t)0x00020002) /*!< Event Mode with Falling edge trigger detection */
mbed_official 610:813dcc80987e 143 #define PWR_PVM_MODE_EVENT_RISING_FALLING ((uint32_t)0x00020003) /*!< Event Mode with Rising/Falling edge trigger detection */
mbed_official 610:813dcc80987e 144 /**
mbed_official 610:813dcc80987e 145 * @}
mbed_official 610:813dcc80987e 146 */
mbed_official 610:813dcc80987e 147
mbed_official 610:813dcc80987e 148
mbed_official 610:813dcc80987e 149
mbed_official 610:813dcc80987e 150 /** @defgroup PWREx_Regulator_Voltage_Scale PWR Regulator voltage scale
mbed_official 610:813dcc80987e 151 * @{
mbed_official 610:813dcc80987e 152 */
mbed_official 610:813dcc80987e 153 #define PWR_REGULATOR_VOLTAGE_SCALE1 PWR_CR1_VOS_0 /*!< Voltage scaling range 1 */
mbed_official 610:813dcc80987e 154 #define PWR_REGULATOR_VOLTAGE_SCALE2 PWR_CR1_VOS_1 /*!< Voltage scaling range 2 */
mbed_official 610:813dcc80987e 155 /**
mbed_official 610:813dcc80987e 156 * @}
mbed_official 610:813dcc80987e 157 */
mbed_official 610:813dcc80987e 158
mbed_official 610:813dcc80987e 159
mbed_official 610:813dcc80987e 160 /** @defgroup PWREx_VBAT_Battery_Charging_Selection PWR battery charging resistor selection
mbed_official 610:813dcc80987e 161 * @{
mbed_official 610:813dcc80987e 162 */
mbed_official 610:813dcc80987e 163 #define PWR_BATTERY_CHARGING_RESISTOR_5 ((uint32_t)0x00000000) /*!< VBAT charging through a 5 kOhms resistor */
mbed_official 610:813dcc80987e 164 #define PWR_BATTERY_CHARGING_RESISTOR_1_5 PWR_CR4_VBRS /*!< VBAT charging through a 1.5 kOhms resistor */
mbed_official 610:813dcc80987e 165 /**
mbed_official 610:813dcc80987e 166 * @}
mbed_official 610:813dcc80987e 167 */
mbed_official 610:813dcc80987e 168
mbed_official 610:813dcc80987e 169 /** @defgroup PWREx_VBAT_Battery_Charging PWR battery charging
mbed_official 610:813dcc80987e 170 * @{
mbed_official 610:813dcc80987e 171 */
mbed_official 610:813dcc80987e 172 #define PWR_BATTERY_CHARGING_DISABLE ((uint32_t)0x00000000)
mbed_official 610:813dcc80987e 173 #define PWR_BATTERY_CHARGING_ENABLE PWR_CR4_VBE
mbed_official 610:813dcc80987e 174 /**
mbed_official 610:813dcc80987e 175 * @}
mbed_official 610:813dcc80987e 176 */
mbed_official 610:813dcc80987e 177
mbed_official 610:813dcc80987e 178 /** @defgroup PWREx_GPIO_Bit_Number GPIO bit number for I/O setting in standby/shutdown mode
mbed_official 610:813dcc80987e 179 * @{
mbed_official 610:813dcc80987e 180 */
mbed_official 610:813dcc80987e 181 #define PWR_GPIO_BIT_0 PWR_PUCRB_PB0 /*!< GPIO port I/O pin 0 */
mbed_official 610:813dcc80987e 182 #define PWR_GPIO_BIT_1 PWR_PUCRB_PB1 /*!< GPIO port I/O pin 1 */
mbed_official 610:813dcc80987e 183 #define PWR_GPIO_BIT_2 PWR_PUCRB_PB2 /*!< GPIO port I/O pin 2 */
mbed_official 610:813dcc80987e 184 #define PWR_GPIO_BIT_3 PWR_PUCRB_PB3 /*!< GPIO port I/O pin 3 */
mbed_official 610:813dcc80987e 185 #define PWR_GPIO_BIT_4 PWR_PUCRB_PB4 /*!< GPIO port I/O pin 4 */
mbed_official 610:813dcc80987e 186 #define PWR_GPIO_BIT_5 PWR_PUCRB_PB5 /*!< GPIO port I/O pin 5 */
mbed_official 610:813dcc80987e 187 #define PWR_GPIO_BIT_6 PWR_PUCRB_PB6 /*!< GPIO port I/O pin 6 */
mbed_official 610:813dcc80987e 188 #define PWR_GPIO_BIT_7 PWR_PUCRB_PB7 /*!< GPIO port I/O pin 7 */
mbed_official 610:813dcc80987e 189 #define PWR_GPIO_BIT_8 PWR_PUCRB_PB8 /*!< GPIO port I/O pin 8 */
mbed_official 610:813dcc80987e 190 #define PWR_GPIO_BIT_9 PWR_PUCRB_PB9 /*!< GPIO port I/O pin 9 */
mbed_official 610:813dcc80987e 191 #define PWR_GPIO_BIT_10 PWR_PUCRB_PB10 /*!< GPIO port I/O pin 10 */
mbed_official 610:813dcc80987e 192 #define PWR_GPIO_BIT_11 PWR_PUCRB_PB11 /*!< GPIO port I/O pin 11 */
mbed_official 610:813dcc80987e 193 #define PWR_GPIO_BIT_12 PWR_PUCRB_PB12 /*!< GPIO port I/O pin 12 */
mbed_official 610:813dcc80987e 194 #define PWR_GPIO_BIT_13 PWR_PUCRB_PB13 /*!< GPIO port I/O pin 13 */
mbed_official 610:813dcc80987e 195 #define PWR_GPIO_BIT_14 PWR_PUCRB_PB14 /*!< GPIO port I/O pin 14 */
mbed_official 610:813dcc80987e 196 #define PWR_GPIO_BIT_15 PWR_PUCRB_PB15 /*!< GPIO port I/O pin15 */
mbed_official 610:813dcc80987e 197 /**
mbed_official 610:813dcc80987e 198 * @}
mbed_official 610:813dcc80987e 199 */
mbed_official 610:813dcc80987e 200
mbed_official 610:813dcc80987e 201 /** @defgroup PWREx_GPIO GPIO port
mbed_official 610:813dcc80987e 202 * @{
mbed_official 610:813dcc80987e 203 */
mbed_official 610:813dcc80987e 204 #define PWR_GPIO_A 0x00000000 /*!< GPIO port A */
mbed_official 610:813dcc80987e 205 #define PWR_GPIO_B 0x00000001 /*!< GPIO port B */
mbed_official 610:813dcc80987e 206 #define PWR_GPIO_C 0x00000002 /*!< GPIO port C */
mbed_official 610:813dcc80987e 207 #define PWR_GPIO_D 0x00000003 /*!< GPIO port D */
mbed_official 610:813dcc80987e 208 #define PWR_GPIO_E 0x00000004 /*!< GPIO port E */
mbed_official 610:813dcc80987e 209 #define PWR_GPIO_F 0x00000005 /*!< GPIO port F */
mbed_official 610:813dcc80987e 210 #define PWR_GPIO_G 0x00000006 /*!< GPIO port G */
mbed_official 610:813dcc80987e 211 #define PWR_GPIO_H 0x00000007 /*!< GPIO port H */
mbed_official 610:813dcc80987e 212 /**
mbed_official 610:813dcc80987e 213 * @}
mbed_official 610:813dcc80987e 214 */
mbed_official 610:813dcc80987e 215
mbed_official 610:813dcc80987e 216 /** @defgroup PWREx_PVM_EXTI_LINE PWR PVM external interrupts lines
mbed_official 610:813dcc80987e 217 * @{
mbed_official 610:813dcc80987e 218 */
mbed_official 610:813dcc80987e 219 #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
mbed_official 610:813dcc80987e 220 #define PWR_EXTI_LINE_PVM1 ((uint32_t)0x00000008) /*!< External interrupt line 35 Connected to the PVM1 EXTI Line */
mbed_official 610:813dcc80987e 221 #endif /* STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
mbed_official 610:813dcc80987e 222
mbed_official 610:813dcc80987e 223 #define PWR_EXTI_LINE_PVM2 ((uint32_t)0x00000010) /*!< External interrupt line 36 Connected to the PVM2 EXTI Line */
mbed_official 610:813dcc80987e 224 #define PWR_EXTI_LINE_PVM3 ((uint32_t)0x00000020) /*!< External interrupt line 37 Connected to the PVM3 EXTI Line */
mbed_official 610:813dcc80987e 225 #define PWR_EXTI_LINE_PVM4 ((uint32_t)0x00000040) /*!< External interrupt line 38 Connected to the PVM4 EXTI Line */
mbed_official 610:813dcc80987e 226 /**
mbed_official 610:813dcc80987e 227 * @}
mbed_official 610:813dcc80987e 228 */
mbed_official 610:813dcc80987e 229
mbed_official 610:813dcc80987e 230 /** @defgroup PWREx_PVM_EVENT_LINE PWR PVM event lines
mbed_official 610:813dcc80987e 231 * @{
mbed_official 610:813dcc80987e 232 */
mbed_official 610:813dcc80987e 233 #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
mbed_official 610:813dcc80987e 234 #define PWR_EVENT_LINE_PVM1 ((uint32_t)0x00000008) /*!< Event line 35 Connected to the PVM1 EXTI Line */
mbed_official 610:813dcc80987e 235 #endif /* STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
mbed_official 610:813dcc80987e 236 #define PWR_EVENT_LINE_PVM2 ((uint32_t)0x00000010) /*!< Event line 36 Connected to the PVM2 EXTI Line */
mbed_official 610:813dcc80987e 237 #define PWR_EVENT_LINE_PVM3 ((uint32_t)0x00000020) /*!< Event line 37 Connected to the PVM3 EXTI Line */
mbed_official 610:813dcc80987e 238 #define PWR_EVENT_LINE_PVM4 ((uint32_t)0x00000040) /*!< Event line 38 Connected to the PVM4 EXTI Line */
mbed_official 610:813dcc80987e 239 /**
mbed_official 610:813dcc80987e 240 * @}
mbed_official 610:813dcc80987e 241 */
mbed_official 610:813dcc80987e 242
mbed_official 610:813dcc80987e 243 /** @defgroup PWREx_Flag PWR Status Flags
mbed_official 610:813dcc80987e 244 * Elements values convention: 0000 0000 0XXY YYYYb
mbed_official 610:813dcc80987e 245 * - Y YYYY : Flag position in the XX register (5 bits)
mbed_official 610:813dcc80987e 246 * - XX : Status register (2 bits)
mbed_official 610:813dcc80987e 247 * - 01: SR1 register
mbed_official 610:813dcc80987e 248 * - 10: SR2 register
mbed_official 610:813dcc80987e 249 * The only exception is PWR_FLAG_WU, encompassing all
mbed_official 610:813dcc80987e 250 * wake-up flags and set to PWR_SR1_WUF.
mbed_official 610:813dcc80987e 251 * @{
mbed_official 610:813dcc80987e 252 */
mbed_official 610:813dcc80987e 253 #define PWR_FLAG_WUF1 ((uint32_t)0x0020) /*!< Wakeup event on wakeup pin 1 */
mbed_official 610:813dcc80987e 254 #define PWR_FLAG_WUF2 ((uint32_t)0x0021) /*!< Wakeup event on wakeup pin 2 */
mbed_official 610:813dcc80987e 255 #define PWR_FLAG_WUF3 ((uint32_t)0x0022) /*!< Wakeup event on wakeup pin 3 */
mbed_official 610:813dcc80987e 256 #define PWR_FLAG_WUF4 ((uint32_t)0x0023) /*!< Wakeup event on wakeup pin 4 */
mbed_official 610:813dcc80987e 257 #define PWR_FLAG_WUF5 ((uint32_t)0x0024) /*!< Wakeup event on wakeup pin 5 */
mbed_official 610:813dcc80987e 258 #define PWR_FLAG_WU PWR_SR1_WUF /*!< Encompass wakeup event on all wakeup pins */
mbed_official 610:813dcc80987e 259 #define PWR_FLAG_SB ((uint32_t)0x0028) /*!< Standby flag */
mbed_official 610:813dcc80987e 260 #define PWR_FLAG_WUFI ((uint32_t)0x002F) /*!< Wakeup on internal wakeup line */
mbed_official 610:813dcc80987e 261
mbed_official 610:813dcc80987e 262 #define PWR_FLAG_REGLPS ((uint32_t)0x0048) /*!< Low-power regulator start flag */
mbed_official 610:813dcc80987e 263 #define PWR_FLAG_REGLPF ((uint32_t)0x0049) /*!< Low-power regulator flag */
mbed_official 610:813dcc80987e 264 #define PWR_FLAG_VOSF ((uint32_t)0x004A) /*!< Voltage scaling flag */
mbed_official 610:813dcc80987e 265 #define PWR_FLAG_PVDO ((uint32_t)0x004B) /*!< Power Voltage Detector output flag */
mbed_official 610:813dcc80987e 266 #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
mbed_official 610:813dcc80987e 267 #define PWR_FLAG_PVMO1 ((uint32_t)0x004C) /*!< Power Voltage Monitoring 1 output flag */
mbed_official 610:813dcc80987e 268 #endif /* STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
mbed_official 610:813dcc80987e 269 #define PWR_FLAG_PVMO2 ((uint32_t)0x004D) /*!< Power Voltage Monitoring 2 output flag */
mbed_official 610:813dcc80987e 270 #define PWR_FLAG_PVMO3 ((uint32_t)0x004E) /*!< Power Voltage Monitoring 3 output flag */
mbed_official 610:813dcc80987e 271 #define PWR_FLAG_PVMO4 ((uint32_t)0x004F) /*!< Power Voltage Monitoring 4 output flag */
mbed_official 610:813dcc80987e 272 /**
mbed_official 610:813dcc80987e 273 * @}
mbed_official 610:813dcc80987e 274 */
mbed_official 610:813dcc80987e 275
mbed_official 610:813dcc80987e 276 /**
mbed_official 610:813dcc80987e 277 * @}
mbed_official 610:813dcc80987e 278 */
mbed_official 610:813dcc80987e 279
mbed_official 610:813dcc80987e 280 /* Exported macros -----------------------------------------------------------*/
mbed_official 610:813dcc80987e 281 /** @defgroup PWREx_Exported_Macros PWR Extended Exported Macros
mbed_official 610:813dcc80987e 282 * @{
mbed_official 610:813dcc80987e 283 */
mbed_official 610:813dcc80987e 284
mbed_official 610:813dcc80987e 285 #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
mbed_official 610:813dcc80987e 286 /**
mbed_official 610:813dcc80987e 287 * @brief Enable the PVM1 Extended Interrupt Line.
mbed_official 610:813dcc80987e 288 * @retval None
mbed_official 610:813dcc80987e 289 */
mbed_official 610:813dcc80987e 290 #define __HAL_PWR_PVM1_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 291
mbed_official 610:813dcc80987e 292 /**
mbed_official 610:813dcc80987e 293 * @brief Disable the PVM1 Extended Interrupt Line.
mbed_official 610:813dcc80987e 294 * @retval None
mbed_official 610:813dcc80987e 295 */
mbed_official 610:813dcc80987e 296 #define __HAL_PWR_PVM1_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 297
mbed_official 610:813dcc80987e 298 /**
mbed_official 610:813dcc80987e 299 * @brief Enable the PVM1 Event Line.
mbed_official 610:813dcc80987e 300 * @retval None
mbed_official 610:813dcc80987e 301 */
mbed_official 610:813dcc80987e 302 #define __HAL_PWR_PVM1_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM1)
mbed_official 610:813dcc80987e 303
mbed_official 610:813dcc80987e 304 /**
mbed_official 610:813dcc80987e 305 * @brief Disable the PVM1 Event Line.
mbed_official 610:813dcc80987e 306 * @retval None
mbed_official 610:813dcc80987e 307 */
mbed_official 610:813dcc80987e 308 #define __HAL_PWR_PVM1_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM1)
mbed_official 610:813dcc80987e 309
mbed_official 610:813dcc80987e 310 /**
mbed_official 610:813dcc80987e 311 * @brief Enable the PVM1 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 312 * @retval None
mbed_official 610:813dcc80987e 313 */
mbed_official 610:813dcc80987e 314 #define __HAL_PWR_PVM1_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 315
mbed_official 610:813dcc80987e 316 /**
mbed_official 610:813dcc80987e 317 * @brief Disable the PVM1 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 318 * @retval None
mbed_official 610:813dcc80987e 319 */
mbed_official 610:813dcc80987e 320 #define __HAL_PWR_PVM1_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 321
mbed_official 610:813dcc80987e 322 /**
mbed_official 610:813dcc80987e 323 * @brief Enable the PVM1 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 324 * @retval None
mbed_official 610:813dcc80987e 325 */
mbed_official 610:813dcc80987e 326 #define __HAL_PWR_PVM1_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 327
mbed_official 610:813dcc80987e 328
mbed_official 610:813dcc80987e 329 /**
mbed_official 610:813dcc80987e 330 * @brief Disable the PVM1 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 331 * @retval None
mbed_official 610:813dcc80987e 332 */
mbed_official 610:813dcc80987e 333 #define __HAL_PWR_PVM1_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 334
mbed_official 610:813dcc80987e 335
mbed_official 610:813dcc80987e 336 /**
mbed_official 610:813dcc80987e 337 * @brief PVM1 EXTI line configuration: set rising & falling edge trigger.
mbed_official 610:813dcc80987e 338 * @retval None
mbed_official 610:813dcc80987e 339 */
mbed_official 610:813dcc80987e 340 #define __HAL_PWR_PVM1_EXTI_ENABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 341 do { \
mbed_official 610:813dcc80987e 342 __HAL_PWR_PVM1_EXTI_ENABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 343 __HAL_PWR_PVM1_EXTI_ENABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 344 } while(0)
mbed_official 610:813dcc80987e 345
mbed_official 610:813dcc80987e 346 /**
mbed_official 610:813dcc80987e 347 * @brief Disable the PVM1 Extended Interrupt Rising & Falling Trigger.
mbed_official 610:813dcc80987e 348 * @retval None
mbed_official 610:813dcc80987e 349 */
mbed_official 610:813dcc80987e 350 #define __HAL_PWR_PVM1_EXTI_DISABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 351 do { \
mbed_official 610:813dcc80987e 352 __HAL_PWR_PVM1_EXTI_DISABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 353 __HAL_PWR_PVM1_EXTI_DISABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 354 } while(0)
mbed_official 610:813dcc80987e 355
mbed_official 610:813dcc80987e 356 /**
mbed_official 610:813dcc80987e 357 * @brief Generate a Software interrupt on selected EXTI line.
mbed_official 610:813dcc80987e 358 * @retval None
mbed_official 610:813dcc80987e 359 */
mbed_official 610:813dcc80987e 360 #define __HAL_PWR_PVM1_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 361
mbed_official 610:813dcc80987e 362 /**
mbed_official 610:813dcc80987e 363 * @brief Check whether the specified PVM1 EXTI interrupt flag is set or not.
mbed_official 610:813dcc80987e 364 * @retval EXTI PVM1 Line Status.
mbed_official 610:813dcc80987e 365 */
mbed_official 610:813dcc80987e 366 #define __HAL_PWR_PVM1_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 367
mbed_official 610:813dcc80987e 368 /**
mbed_official 610:813dcc80987e 369 * @brief Clear the PVM1 EXTI flag.
mbed_official 610:813dcc80987e 370 * @retval None
mbed_official 610:813dcc80987e 371 */
mbed_official 610:813dcc80987e 372 #define __HAL_PWR_PVM1_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM1)
mbed_official 610:813dcc80987e 373
mbed_official 610:813dcc80987e 374 #endif /* defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) */
mbed_official 610:813dcc80987e 375
mbed_official 610:813dcc80987e 376
mbed_official 610:813dcc80987e 377 /**
mbed_official 610:813dcc80987e 378 * @brief Enable the PVM2 Extended Interrupt Line.
mbed_official 610:813dcc80987e 379 * @retval None
mbed_official 610:813dcc80987e 380 */
mbed_official 610:813dcc80987e 381 #define __HAL_PWR_PVM2_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 382
mbed_official 610:813dcc80987e 383 /**
mbed_official 610:813dcc80987e 384 * @brief Disable the PVM2 Extended Interrupt Line.
mbed_official 610:813dcc80987e 385 * @retval None
mbed_official 610:813dcc80987e 386 */
mbed_official 610:813dcc80987e 387 #define __HAL_PWR_PVM2_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 388
mbed_official 610:813dcc80987e 389 /**
mbed_official 610:813dcc80987e 390 * @brief Enable the PVM2 Event Line.
mbed_official 610:813dcc80987e 391 * @retval None
mbed_official 610:813dcc80987e 392 */
mbed_official 610:813dcc80987e 393 #define __HAL_PWR_PVM2_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM2)
mbed_official 610:813dcc80987e 394
mbed_official 610:813dcc80987e 395 /**
mbed_official 610:813dcc80987e 396 * @brief Disable the PVM2 Event Line.
mbed_official 610:813dcc80987e 397 * @retval None
mbed_official 610:813dcc80987e 398 */
mbed_official 610:813dcc80987e 399 #define __HAL_PWR_PVM2_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM2)
mbed_official 610:813dcc80987e 400
mbed_official 610:813dcc80987e 401 /**
mbed_official 610:813dcc80987e 402 * @brief Enable the PVM2 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 403 * @retval None
mbed_official 610:813dcc80987e 404 */
mbed_official 610:813dcc80987e 405 #define __HAL_PWR_PVM2_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 406
mbed_official 610:813dcc80987e 407 /**
mbed_official 610:813dcc80987e 408 * @brief Disable the PVM2 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 409 * @retval None
mbed_official 610:813dcc80987e 410 */
mbed_official 610:813dcc80987e 411 #define __HAL_PWR_PVM2_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 412
mbed_official 610:813dcc80987e 413 /**
mbed_official 610:813dcc80987e 414 * @brief Enable the PVM2 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 415 * @retval None
mbed_official 610:813dcc80987e 416 */
mbed_official 610:813dcc80987e 417 #define __HAL_PWR_PVM2_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 418
mbed_official 610:813dcc80987e 419
mbed_official 610:813dcc80987e 420 /**
mbed_official 610:813dcc80987e 421 * @brief Disable the PVM2 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 422 * @retval None
mbed_official 610:813dcc80987e 423 */
mbed_official 610:813dcc80987e 424 #define __HAL_PWR_PVM2_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 425
mbed_official 610:813dcc80987e 426
mbed_official 610:813dcc80987e 427 /**
mbed_official 610:813dcc80987e 428 * @brief PVM2 EXTI line configuration: set rising & falling edge trigger.
mbed_official 610:813dcc80987e 429 * @retval None
mbed_official 610:813dcc80987e 430 */
mbed_official 610:813dcc80987e 431 #define __HAL_PWR_PVM2_EXTI_ENABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 432 do { \
mbed_official 610:813dcc80987e 433 __HAL_PWR_PVM2_EXTI_ENABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 434 __HAL_PWR_PVM2_EXTI_ENABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 435 } while(0)
mbed_official 610:813dcc80987e 436
mbed_official 610:813dcc80987e 437 /**
mbed_official 610:813dcc80987e 438 * @brief Disable the PVM2 Extended Interrupt Rising & Falling Trigger.
mbed_official 610:813dcc80987e 439 * @retval None
mbed_official 610:813dcc80987e 440 */
mbed_official 610:813dcc80987e 441 #define __HAL_PWR_PVM2_EXTI_DISABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 442 do { \
mbed_official 610:813dcc80987e 443 __HAL_PWR_PVM2_EXTI_DISABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 444 __HAL_PWR_PVM2_EXTI_DISABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 445 } while(0)
mbed_official 610:813dcc80987e 446
mbed_official 610:813dcc80987e 447 /**
mbed_official 610:813dcc80987e 448 * @brief Generate a Software interrupt on selected EXTI line.
mbed_official 610:813dcc80987e 449 * @retval None
mbed_official 610:813dcc80987e 450 */
mbed_official 610:813dcc80987e 451 #define __HAL_PWR_PVM2_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 452
mbed_official 610:813dcc80987e 453 /**
mbed_official 610:813dcc80987e 454 * @brief Check whether the specified PVM2 EXTI interrupt flag is set or not.
mbed_official 610:813dcc80987e 455 * @retval EXTI PVM2 Line Status.
mbed_official 610:813dcc80987e 456 */
mbed_official 610:813dcc80987e 457 #define __HAL_PWR_PVM2_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 458
mbed_official 610:813dcc80987e 459 /**
mbed_official 610:813dcc80987e 460 * @brief Clear the PVM2 EXTI flag.
mbed_official 610:813dcc80987e 461 * @retval None
mbed_official 610:813dcc80987e 462 */
mbed_official 610:813dcc80987e 463 #define __HAL_PWR_PVM2_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM2)
mbed_official 610:813dcc80987e 464
mbed_official 610:813dcc80987e 465
mbed_official 610:813dcc80987e 466
mbed_official 610:813dcc80987e 467
mbed_official 610:813dcc80987e 468 /**
mbed_official 610:813dcc80987e 469 * @brief Enable the PVM3 Extended Interrupt Line.
mbed_official 610:813dcc80987e 470 * @retval None
mbed_official 610:813dcc80987e 471 */
mbed_official 610:813dcc80987e 472 #define __HAL_PWR_PVM3_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 473
mbed_official 610:813dcc80987e 474 /**
mbed_official 610:813dcc80987e 475 * @brief Disable the PVM3 Extended Interrupt Line.
mbed_official 610:813dcc80987e 476 * @retval None
mbed_official 610:813dcc80987e 477 */
mbed_official 610:813dcc80987e 478 #define __HAL_PWR_PVM3_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 479
mbed_official 610:813dcc80987e 480 /**
mbed_official 610:813dcc80987e 481 * @brief Enable the PVM3 Event Line.
mbed_official 610:813dcc80987e 482 * @retval None
mbed_official 610:813dcc80987e 483 */
mbed_official 610:813dcc80987e 484 #define __HAL_PWR_PVM3_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM3)
mbed_official 610:813dcc80987e 485
mbed_official 610:813dcc80987e 486 /**
mbed_official 610:813dcc80987e 487 * @brief Disable the PVM3 Event Line.
mbed_official 610:813dcc80987e 488 * @retval None
mbed_official 610:813dcc80987e 489 */
mbed_official 610:813dcc80987e 490 #define __HAL_PWR_PVM3_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM3)
mbed_official 610:813dcc80987e 491
mbed_official 610:813dcc80987e 492 /**
mbed_official 610:813dcc80987e 493 * @brief Enable the PVM3 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 494 * @retval None
mbed_official 610:813dcc80987e 495 */
mbed_official 610:813dcc80987e 496 #define __HAL_PWR_PVM3_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 497
mbed_official 610:813dcc80987e 498 /**
mbed_official 610:813dcc80987e 499 * @brief Disable the PVM3 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 500 * @retval None
mbed_official 610:813dcc80987e 501 */
mbed_official 610:813dcc80987e 502 #define __HAL_PWR_PVM3_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 503
mbed_official 610:813dcc80987e 504 /**
mbed_official 610:813dcc80987e 505 * @brief Enable the PVM3 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 506 * @retval None
mbed_official 610:813dcc80987e 507 */
mbed_official 610:813dcc80987e 508 #define __HAL_PWR_PVM3_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 509
mbed_official 610:813dcc80987e 510
mbed_official 610:813dcc80987e 511 /**
mbed_official 610:813dcc80987e 512 * @brief Disable the PVM3 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 513 * @retval None
mbed_official 610:813dcc80987e 514 */
mbed_official 610:813dcc80987e 515 #define __HAL_PWR_PVM3_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 516
mbed_official 610:813dcc80987e 517
mbed_official 610:813dcc80987e 518 /**
mbed_official 610:813dcc80987e 519 * @brief PVM3 EXTI line configuration: set rising & falling edge trigger.
mbed_official 610:813dcc80987e 520 * @retval None
mbed_official 610:813dcc80987e 521 */
mbed_official 610:813dcc80987e 522 #define __HAL_PWR_PVM3_EXTI_ENABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 523 do { \
mbed_official 610:813dcc80987e 524 __HAL_PWR_PVM3_EXTI_ENABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 525 __HAL_PWR_PVM3_EXTI_ENABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 526 } while(0)
mbed_official 610:813dcc80987e 527
mbed_official 610:813dcc80987e 528 /**
mbed_official 610:813dcc80987e 529 * @brief Disable the PVM3 Extended Interrupt Rising & Falling Trigger.
mbed_official 610:813dcc80987e 530 * @retval None
mbed_official 610:813dcc80987e 531 */
mbed_official 610:813dcc80987e 532 #define __HAL_PWR_PVM3_EXTI_DISABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 533 do { \
mbed_official 610:813dcc80987e 534 __HAL_PWR_PVM3_EXTI_DISABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 535 __HAL_PWR_PVM3_EXTI_DISABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 536 } while(0)
mbed_official 610:813dcc80987e 537
mbed_official 610:813dcc80987e 538 /**
mbed_official 610:813dcc80987e 539 * @brief Generate a Software interrupt on selected EXTI line.
mbed_official 610:813dcc80987e 540 * @retval None
mbed_official 610:813dcc80987e 541 */
mbed_official 610:813dcc80987e 542 #define __HAL_PWR_PVM3_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 543
mbed_official 610:813dcc80987e 544 /**
mbed_official 610:813dcc80987e 545 * @brief Check whether the specified PVM3 EXTI interrupt flag is set or not.
mbed_official 610:813dcc80987e 546 * @retval EXTI PVM3 Line Status.
mbed_official 610:813dcc80987e 547 */
mbed_official 610:813dcc80987e 548 #define __HAL_PWR_PVM3_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 549
mbed_official 610:813dcc80987e 550 /**
mbed_official 610:813dcc80987e 551 * @brief Clear the PVM3 EXTI flag.
mbed_official 610:813dcc80987e 552 * @retval None
mbed_official 610:813dcc80987e 553 */
mbed_official 610:813dcc80987e 554 #define __HAL_PWR_PVM3_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM3)
mbed_official 610:813dcc80987e 555
mbed_official 610:813dcc80987e 556
mbed_official 610:813dcc80987e 557
mbed_official 610:813dcc80987e 558
mbed_official 610:813dcc80987e 559 /**
mbed_official 610:813dcc80987e 560 * @brief Enable the PVM4 Extended Interrupt Line.
mbed_official 610:813dcc80987e 561 * @retval None
mbed_official 610:813dcc80987e 562 */
mbed_official 610:813dcc80987e 563 #define __HAL_PWR_PVM4_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 564
mbed_official 610:813dcc80987e 565 /**
mbed_official 610:813dcc80987e 566 * @brief Disable the PVM4 Extended Interrupt Line.
mbed_official 610:813dcc80987e 567 * @retval None
mbed_official 610:813dcc80987e 568 */
mbed_official 610:813dcc80987e 569 #define __HAL_PWR_PVM4_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 570
mbed_official 610:813dcc80987e 571 /**
mbed_official 610:813dcc80987e 572 * @brief Enable the PVM4 Event Line.
mbed_official 610:813dcc80987e 573 * @retval None
mbed_official 610:813dcc80987e 574 */
mbed_official 610:813dcc80987e 575 #define __HAL_PWR_PVM4_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM4)
mbed_official 610:813dcc80987e 576
mbed_official 610:813dcc80987e 577 /**
mbed_official 610:813dcc80987e 578 * @brief Disable the PVM4 Event Line.
mbed_official 610:813dcc80987e 579 * @retval None
mbed_official 610:813dcc80987e 580 */
mbed_official 610:813dcc80987e 581 #define __HAL_PWR_PVM4_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR2, PWR_EVENT_LINE_PVM4)
mbed_official 610:813dcc80987e 582
mbed_official 610:813dcc80987e 583 /**
mbed_official 610:813dcc80987e 584 * @brief Enable the PVM4 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 585 * @retval None
mbed_official 610:813dcc80987e 586 */
mbed_official 610:813dcc80987e 587 #define __HAL_PWR_PVM4_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 588
mbed_official 610:813dcc80987e 589 /**
mbed_official 610:813dcc80987e 590 * @brief Disable the PVM4 Extended Interrupt Rising Trigger.
mbed_official 610:813dcc80987e 591 * @retval None
mbed_official 610:813dcc80987e 592 */
mbed_official 610:813dcc80987e 593 #define __HAL_PWR_PVM4_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 594
mbed_official 610:813dcc80987e 595 /**
mbed_official 610:813dcc80987e 596 * @brief Enable the PVM4 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 597 * @retval None
mbed_official 610:813dcc80987e 598 */
mbed_official 610:813dcc80987e 599 #define __HAL_PWR_PVM4_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 600
mbed_official 610:813dcc80987e 601
mbed_official 610:813dcc80987e 602 /**
mbed_official 610:813dcc80987e 603 * @brief Disable the PVM4 Extended Interrupt Falling Trigger.
mbed_official 610:813dcc80987e 604 * @retval None
mbed_official 610:813dcc80987e 605 */
mbed_official 610:813dcc80987e 606 #define __HAL_PWR_PVM4_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 607
mbed_official 610:813dcc80987e 608
mbed_official 610:813dcc80987e 609 /**
mbed_official 610:813dcc80987e 610 * @brief PVM4 EXTI line configuration: set rising & falling edge trigger.
mbed_official 610:813dcc80987e 611 * @retval None
mbed_official 610:813dcc80987e 612 */
mbed_official 610:813dcc80987e 613 #define __HAL_PWR_PVM4_EXTI_ENABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 614 do { \
mbed_official 610:813dcc80987e 615 __HAL_PWR_PVM4_EXTI_ENABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 616 __HAL_PWR_PVM4_EXTI_ENABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 617 } while(0)
mbed_official 610:813dcc80987e 618
mbed_official 610:813dcc80987e 619 /**
mbed_official 610:813dcc80987e 620 * @brief Disable the PVM4 Extended Interrupt Rising & Falling Trigger.
mbed_official 610:813dcc80987e 621 * @retval None
mbed_official 610:813dcc80987e 622 */
mbed_official 610:813dcc80987e 623 #define __HAL_PWR_PVM4_EXTI_DISABLE_RISING_FALLING_EDGE() \
mbed_official 610:813dcc80987e 624 do { \
mbed_official 610:813dcc80987e 625 __HAL_PWR_PVM4_EXTI_DISABLE_RISING_EDGE(); \
mbed_official 610:813dcc80987e 626 __HAL_PWR_PVM4_EXTI_DISABLE_FALLING_EDGE(); \
mbed_official 610:813dcc80987e 627 } while(0)
mbed_official 610:813dcc80987e 628
mbed_official 610:813dcc80987e 629 /**
mbed_official 610:813dcc80987e 630 * @brief Generate a Software interrupt on selected EXTI line.
mbed_official 610:813dcc80987e 631 * @retval None
mbed_official 610:813dcc80987e 632 */
mbed_official 610:813dcc80987e 633 #define __HAL_PWR_PVM4_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 634
mbed_official 610:813dcc80987e 635 /**
mbed_official 610:813dcc80987e 636 * @brief Check whether or not the specified PVM4 EXTI interrupt flag is set.
mbed_official 610:813dcc80987e 637 * @retval EXTI PVM4 Line Status.
mbed_official 610:813dcc80987e 638 */
mbed_official 610:813dcc80987e 639 #define __HAL_PWR_PVM4_EXTI_GET_FLAG() (EXTI->PR2 & PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 640
mbed_official 610:813dcc80987e 641 /**
mbed_official 610:813dcc80987e 642 * @brief Clear the PVM4 EXTI flag.
mbed_official 610:813dcc80987e 643 * @retval None
mbed_official 610:813dcc80987e 644 */
mbed_official 610:813dcc80987e 645 #define __HAL_PWR_PVM4_EXTI_CLEAR_FLAG() WRITE_REG(EXTI->PR2, PWR_EXTI_LINE_PVM4)
mbed_official 610:813dcc80987e 646
mbed_official 610:813dcc80987e 647
mbed_official 610:813dcc80987e 648 /**
mbed_official 610:813dcc80987e 649 * @brief Configure the main internal regulator output voltage.
mbed_official 610:813dcc80987e 650 * @param __REGULATOR__: specifies the regulator output voltage to achieve
mbed_official 610:813dcc80987e 651 * a tradeoff between performance and power consumption.
mbed_official 610:813dcc80987e 652 * This parameter can be one of the following values:
mbed_official 610:813dcc80987e 653 * @arg PWR_REGULATOR_VOLTAGE_SCALE1: Regulator voltage output range 1 mode,
mbed_official 610:813dcc80987e 654 * typical output voltage at 1.2 V,
mbed_official 610:813dcc80987e 655 * system frequency up to 80 MHz.
mbed_official 610:813dcc80987e 656 * @arg PWR_REGULATOR_VOLTAGE_SCALE2: Regulator voltage output range 2 mode,
mbed_official 610:813dcc80987e 657 * typical output voltage at 1.0 V,
mbed_official 610:813dcc80987e 658 * system frequency up to 26 MHz.
mbed_official 610:813dcc80987e 659 * @note This macro is similar to HAL_PWREx_ControlVoltageScaling() API but doesn't check
mbed_official 610:813dcc80987e 660 * whether or not VOSF flag is cleared when moving from range 2 to range 1. User
mbed_official 610:813dcc80987e 661 * may resort to __HAL_PWR_GET_FLAG() macro to check VOSF bit resetting.
mbed_official 610:813dcc80987e 662 * @retval None
mbed_official 610:813dcc80987e 663 */
mbed_official 610:813dcc80987e 664 #define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__) do { \
mbed_official 610:813dcc80987e 665 __IO uint32_t tmpreg; \
mbed_official 610:813dcc80987e 666 MODIFY_REG(PWR->CR1, PWR_CR1_VOS, (__REGULATOR__)); \
mbed_official 610:813dcc80987e 667 /* Delay after an RCC peripheral clock enabling */ \
mbed_official 610:813dcc80987e 668 tmpreg = READ_BIT(PWR->CR1, PWR_CR1_VOS); \
mbed_official 610:813dcc80987e 669 UNUSED(tmpreg); \
mbed_official 610:813dcc80987e 670 } while(0)
mbed_official 610:813dcc80987e 671
mbed_official 610:813dcc80987e 672 /**
mbed_official 610:813dcc80987e 673 * @}
mbed_official 610:813dcc80987e 674 */
mbed_official 610:813dcc80987e 675
mbed_official 610:813dcc80987e 676 /* Private macros --------------------------------------------------------*/
mbed_official 610:813dcc80987e 677 /** @addtogroup PWREx_Private_Macros PWR Extended Private Macros
mbed_official 610:813dcc80987e 678 * @{
mbed_official 610:813dcc80987e 679 */
mbed_official 610:813dcc80987e 680
mbed_official 610:813dcc80987e 681 #define IS_PWR_WAKEUP_PIN(PIN) (((PIN) == PWR_WAKEUP_PIN1) || \
mbed_official 610:813dcc80987e 682 ((PIN) == PWR_WAKEUP_PIN2) || \
mbed_official 610:813dcc80987e 683 ((PIN) == PWR_WAKEUP_PIN3) || \
mbed_official 610:813dcc80987e 684 ((PIN) == PWR_WAKEUP_PIN4) || \
mbed_official 610:813dcc80987e 685 ((PIN) == PWR_WAKEUP_PIN5) || \
mbed_official 610:813dcc80987e 686 ((PIN) == PWR_WAKEUP_PIN1_HIGH) || \
mbed_official 610:813dcc80987e 687 ((PIN) == PWR_WAKEUP_PIN2_HIGH) || \
mbed_official 610:813dcc80987e 688 ((PIN) == PWR_WAKEUP_PIN3_HIGH) || \
mbed_official 610:813dcc80987e 689 ((PIN) == PWR_WAKEUP_PIN4_HIGH) || \
mbed_official 610:813dcc80987e 690 ((PIN) == PWR_WAKEUP_PIN5_HIGH) || \
mbed_official 610:813dcc80987e 691 ((PIN) == PWR_WAKEUP_PIN1_LOW) || \
mbed_official 610:813dcc80987e 692 ((PIN) == PWR_WAKEUP_PIN2_LOW) || \
mbed_official 610:813dcc80987e 693 ((PIN) == PWR_WAKEUP_PIN3_LOW) || \
mbed_official 610:813dcc80987e 694 ((PIN) == PWR_WAKEUP_PIN4_LOW) || \
mbed_official 610:813dcc80987e 695 ((PIN) == PWR_WAKEUP_PIN5_LOW))
mbed_official 610:813dcc80987e 696
mbed_official 610:813dcc80987e 697 #define IS_PWR_PVM_TYPE(TYPE) (((TYPE) & PWR_CR2_PVME) != RESET)
mbed_official 610:813dcc80987e 698
mbed_official 610:813dcc80987e 699 #define IS_PWR_PVM_MODE(MODE) (((MODE) == PWR_PVM_MODE_NORMAL) ||\
mbed_official 610:813dcc80987e 700 ((MODE) == PWR_PVM_MODE_IT_RISING) ||\
mbed_official 610:813dcc80987e 701 ((MODE) == PWR_PVM_MODE_IT_FALLING) ||\
mbed_official 610:813dcc80987e 702 ((MODE) == PWR_PVM_MODE_IT_RISING_FALLING) ||\
mbed_official 610:813dcc80987e 703 ((MODE) == PWR_PVM_MODE_EVENT_RISING) ||\
mbed_official 610:813dcc80987e 704 ((MODE) == PWR_PVM_MODE_EVENT_FALLING) ||\
mbed_official 610:813dcc80987e 705 ((MODE) == PWR_PVM_MODE_EVENT_RISING_FALLING))
mbed_official 610:813dcc80987e 706
mbed_official 610:813dcc80987e 707 #define IS_PWR_VOLTAGE_SCALING_RANGE(RANGE) (((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE1) || \
mbed_official 610:813dcc80987e 708 ((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE2))
mbed_official 610:813dcc80987e 709
mbed_official 610:813dcc80987e 710 #define IS_PWR_BATTERY_RESISTOR_SELECT(RESISTOR) (((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_5) ||\
mbed_official 610:813dcc80987e 711 ((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_1_5))
mbed_official 610:813dcc80987e 712
mbed_official 610:813dcc80987e 713 #define IS_PWR_BATTERY_CHARGING(CHARGING) (((CHARGING) == PWR_BATTERY_CHARGING_DISABLE) ||\
mbed_official 610:813dcc80987e 714 ((CHARGING) == PWR_BATTERY_CHARGING_ENABLE))
mbed_official 610:813dcc80987e 715
mbed_official 610:813dcc80987e 716 #define IS_PWR_GPIO_BIT_NUMBER(BIT_NUMBER) (((BIT_NUMBER) == PWR_GPIO_BIT_0) ||\
mbed_official 610:813dcc80987e 717 ((BIT_NUMBER) == PWR_GPIO_BIT_1) ||\
mbed_official 610:813dcc80987e 718 ((BIT_NUMBER) == PWR_GPIO_BIT_2) ||\
mbed_official 610:813dcc80987e 719 ((BIT_NUMBER) == PWR_GPIO_BIT_3) ||\
mbed_official 610:813dcc80987e 720 ((BIT_NUMBER) == PWR_GPIO_BIT_4) ||\
mbed_official 610:813dcc80987e 721 ((BIT_NUMBER) == PWR_GPIO_BIT_5) ||\
mbed_official 610:813dcc80987e 722 ((BIT_NUMBER) == PWR_GPIO_BIT_6) ||\
mbed_official 610:813dcc80987e 723 ((BIT_NUMBER) == PWR_GPIO_BIT_7) ||\
mbed_official 610:813dcc80987e 724 ((BIT_NUMBER) == PWR_GPIO_BIT_8) ||\
mbed_official 610:813dcc80987e 725 ((BIT_NUMBER) == PWR_GPIO_BIT_9) ||\
mbed_official 610:813dcc80987e 726 ((BIT_NUMBER) == PWR_GPIO_BIT_10) ||\
mbed_official 610:813dcc80987e 727 ((BIT_NUMBER) == PWR_GPIO_BIT_11) ||\
mbed_official 610:813dcc80987e 728 ((BIT_NUMBER) == PWR_GPIO_BIT_12) ||\
mbed_official 610:813dcc80987e 729 ((BIT_NUMBER) == PWR_GPIO_BIT_13) ||\
mbed_official 610:813dcc80987e 730 ((BIT_NUMBER) == PWR_GPIO_BIT_14) ||\
mbed_official 610:813dcc80987e 731 ((BIT_NUMBER) == PWR_GPIO_BIT_15))
mbed_official 610:813dcc80987e 732
mbed_official 610:813dcc80987e 733 #define IS_PWR_GPIO(GPIO) (((GPIO) == PWR_GPIO_A) ||\
mbed_official 610:813dcc80987e 734 ((GPIO) == PWR_GPIO_B) ||\
mbed_official 610:813dcc80987e 735 ((GPIO) == PWR_GPIO_C) ||\
mbed_official 610:813dcc80987e 736 ((GPIO) == PWR_GPIO_D) ||\
mbed_official 610:813dcc80987e 737 ((GPIO) == PWR_GPIO_E) ||\
mbed_official 610:813dcc80987e 738 ((GPIO) == PWR_GPIO_F) ||\
mbed_official 610:813dcc80987e 739 ((GPIO) == PWR_GPIO_G) ||\
mbed_official 610:813dcc80987e 740 ((GPIO) == PWR_GPIO_H))
mbed_official 610:813dcc80987e 741
mbed_official 610:813dcc80987e 742 /**
mbed_official 610:813dcc80987e 743 * @}
mbed_official 610:813dcc80987e 744 */
mbed_official 610:813dcc80987e 745
mbed_official 610:813dcc80987e 746
mbed_official 610:813dcc80987e 747 /** @addtogroup PWREx_Exported_Functions PWR Extended Exported Functions
mbed_official 610:813dcc80987e 748 * @{
mbed_official 610:813dcc80987e 749 */
mbed_official 610:813dcc80987e 750
mbed_official 610:813dcc80987e 751 /** @addtogroup PWREx_Exported_Functions_Group1 Extended Peripheral Control functions
mbed_official 610:813dcc80987e 752 * @{
mbed_official 610:813dcc80987e 753 */
mbed_official 610:813dcc80987e 754
mbed_official 610:813dcc80987e 755
mbed_official 610:813dcc80987e 756 /* Peripheral Control functions **********************************************/
mbed_official 610:813dcc80987e 757 uint32_t HAL_PWREx_GetVoltageRange(void);
mbed_official 610:813dcc80987e 758 HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling);
mbed_official 610:813dcc80987e 759 void HAL_PWREx_EnableBatteryCharging(uint32_t ResistorSelection);
mbed_official 610:813dcc80987e 760 void HAL_PWREx_DisableBatteryCharging(void);
mbed_official 610:813dcc80987e 761 #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
mbed_official 610:813dcc80987e 762 void HAL_PWREx_EnableVddUSB(void);
mbed_official 610:813dcc80987e 763 void HAL_PWREx_DisableVddUSB(void);
mbed_official 610:813dcc80987e 764 #endif /* defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) */
mbed_official 610:813dcc80987e 765 void HAL_PWREx_EnableVddIO2(void);
mbed_official 610:813dcc80987e 766 void HAL_PWREx_DisableVddIO2(void);
mbed_official 610:813dcc80987e 767 void HAL_PWREx_EnableInternalWakeUpLine(void);
mbed_official 610:813dcc80987e 768 void HAL_PWREx_DisableInternalWakeUpLine(void);
mbed_official 610:813dcc80987e 769 HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber);
mbed_official 610:813dcc80987e 770 HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber);
mbed_official 610:813dcc80987e 771 HAL_StatusTypeDef HAL_PWREx_EnableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber);
mbed_official 610:813dcc80987e 772 HAL_StatusTypeDef HAL_PWREx_DisableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber);
mbed_official 610:813dcc80987e 773 void HAL_PWREx_EnablePullUpPullDownConfig(void);
mbed_official 610:813dcc80987e 774 void HAL_PWREx_DisablePullUpPullDownConfig(void);
mbed_official 610:813dcc80987e 775 void HAL_PWREx_EnableSRAM2ContentRetention(void);
mbed_official 610:813dcc80987e 776 void HAL_PWREx_DisableSRAM2ContentRetention(void);
mbed_official 610:813dcc80987e 777 #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
mbed_official 610:813dcc80987e 778 void HAL_PWREx_EnablePVM1(void);
mbed_official 610:813dcc80987e 779 void HAL_PWREx_DisablePVM1(void);
mbed_official 610:813dcc80987e 780 #endif /* defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) */
mbed_official 610:813dcc80987e 781 void HAL_PWREx_EnablePVM2(void);
mbed_official 610:813dcc80987e 782 void HAL_PWREx_DisablePVM2(void);
mbed_official 610:813dcc80987e 783 void HAL_PWREx_EnablePVM3(void);
mbed_official 610:813dcc80987e 784 void HAL_PWREx_DisablePVM3(void);
mbed_official 610:813dcc80987e 785 void HAL_PWREx_EnablePVM4(void);
mbed_official 610:813dcc80987e 786 void HAL_PWREx_DisablePVM4(void);
mbed_official 610:813dcc80987e 787 HAL_StatusTypeDef HAL_PWREx_ConfigPVM(PWR_PVMTypeDef *sConfigPVM);
mbed_official 610:813dcc80987e 788
mbed_official 610:813dcc80987e 789
mbed_official 610:813dcc80987e 790 /* Low Power modes configuration functions ************************************/
mbed_official 610:813dcc80987e 791 void HAL_PWREx_EnableLowPowerRunMode(void);
mbed_official 610:813dcc80987e 792 HAL_StatusTypeDef HAL_PWREx_DisableLowPowerRunMode(void);
mbed_official 610:813dcc80987e 793 void HAL_PWREx_EnterSTOP1Mode(uint32_t Regulator, uint8_t STOPEntry);
mbed_official 610:813dcc80987e 794 void HAL_PWREx_EnterSTOP2Mode(uint8_t STOPEntry);
mbed_official 610:813dcc80987e 795 void HAL_PWREx_EnterSHUTDOWNMode(void);
mbed_official 610:813dcc80987e 796
mbed_official 610:813dcc80987e 797 void HAL_PWREx_PVD_PVM_IRQHandler(void);
mbed_official 610:813dcc80987e 798 #if defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx)
mbed_official 610:813dcc80987e 799 void HAL_PWREx_PVM1Callback(void);
mbed_official 610:813dcc80987e 800 #endif /* defined (STM32L475xx) || defined (STM32L476xx) || defined (STM32L485xx) || defined (STM32L486xx) */
mbed_official 610:813dcc80987e 801 void HAL_PWREx_PVM2Callback(void);
mbed_official 610:813dcc80987e 802 void HAL_PWREx_PVM3Callback(void);
mbed_official 610:813dcc80987e 803 void HAL_PWREx_PVM4Callback(void);
mbed_official 610:813dcc80987e 804
mbed_official 610:813dcc80987e 805
mbed_official 610:813dcc80987e 806 /**
mbed_official 610:813dcc80987e 807 * @}
mbed_official 610:813dcc80987e 808 */
mbed_official 610:813dcc80987e 809
mbed_official 610:813dcc80987e 810 /**
mbed_official 610:813dcc80987e 811 * @}
mbed_official 610:813dcc80987e 812 */
mbed_official 610:813dcc80987e 813
mbed_official 610:813dcc80987e 814 /**
mbed_official 610:813dcc80987e 815 * @}
mbed_official 610:813dcc80987e 816 */
mbed_official 610:813dcc80987e 817
mbed_official 610:813dcc80987e 818 /**
mbed_official 610:813dcc80987e 819 * @}
mbed_official 610:813dcc80987e 820 */
mbed_official 610:813dcc80987e 821
mbed_official 610:813dcc80987e 822 #ifdef __cplusplus
mbed_official 610:813dcc80987e 823 }
mbed_official 610:813dcc80987e 824 #endif
mbed_official 610:813dcc80987e 825
mbed_official 610:813dcc80987e 826
mbed_official 610:813dcc80987e 827 #endif /* __STM32L4xx_HAL_PWR_EX_H */
mbed_official 610:813dcc80987e 828
mbed_official 610:813dcc80987e 829 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/