The official mbed C/C SDK provides the software platform and libraries to build your applications.
Fork of mbed by
TARGET_NUCLEO_F334R8/stm32f3xx_hal_pwr_ex.h@92:4fc01daae5a5, 2014-11-27 (annotated)
- Committer:
- bogdanm
- Date:
- Thu Nov 27 13:33:22 2014 +0000
- Revision:
- 92:4fc01daae5a5
- Parent:
- 86:04dd9b1680ae
Release 92 of the mbed libray
Main changes:
- nRF51822: fixed pin assignment issues
- ST targets moving to the STM32Cube driver
- LPC1439: fixed serial interrupt issue
- first Cortex-A platform supported in mbed (RZ_A1H)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 86:04dd9b1680ae | 1 | /** |
bogdanm | 86:04dd9b1680ae | 2 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 3 | * @file stm32f3xx_hal_pwr_ex.h |
bogdanm | 86:04dd9b1680ae | 4 | * @author MCD Application Team |
bogdanm | 92:4fc01daae5a5 | 5 | * @version V1.1.0 |
bogdanm | 92:4fc01daae5a5 | 6 | * @date 12-Sept-2014 |
bogdanm | 92:4fc01daae5a5 | 7 | * @brief Header file of PWR HAL Extended module. |
bogdanm | 86:04dd9b1680ae | 8 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 9 | * @attention |
bogdanm | 86:04dd9b1680ae | 10 | * |
bogdanm | 86:04dd9b1680ae | 11 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
bogdanm | 86:04dd9b1680ae | 12 | * |
bogdanm | 86:04dd9b1680ae | 13 | * Redistribution and use in source and binary forms, with or without modification, |
bogdanm | 86:04dd9b1680ae | 14 | * are permitted provided that the following conditions are met: |
bogdanm | 86:04dd9b1680ae | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 16 | * this list of conditions and the following disclaimer. |
bogdanm | 86:04dd9b1680ae | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 18 | * this list of conditions and the following disclaimer in the documentation |
bogdanm | 86:04dd9b1680ae | 19 | * and/or other materials provided with the distribution. |
bogdanm | 86:04dd9b1680ae | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
bogdanm | 86:04dd9b1680ae | 21 | * may be used to endorse or promote products derived from this software |
bogdanm | 86:04dd9b1680ae | 22 | * without specific prior written permission. |
bogdanm | 86:04dd9b1680ae | 23 | * |
bogdanm | 86:04dd9b1680ae | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
bogdanm | 86:04dd9b1680ae | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
bogdanm | 86:04dd9b1680ae | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
bogdanm | 86:04dd9b1680ae | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
bogdanm | 86:04dd9b1680ae | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
bogdanm | 86:04dd9b1680ae | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
bogdanm | 86:04dd9b1680ae | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
bogdanm | 86:04dd9b1680ae | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
bogdanm | 86:04dd9b1680ae | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
bogdanm | 86:04dd9b1680ae | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
bogdanm | 86:04dd9b1680ae | 34 | * |
bogdanm | 86:04dd9b1680ae | 35 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 36 | */ |
bogdanm | 86:04dd9b1680ae | 37 | |
bogdanm | 86:04dd9b1680ae | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 39 | #ifndef __STM32F3xx_HAL_PWR_EX_H |
bogdanm | 86:04dd9b1680ae | 40 | #define __STM32F3xx_HAL_PWR_EX_H |
bogdanm | 86:04dd9b1680ae | 41 | |
bogdanm | 86:04dd9b1680ae | 42 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 43 | extern "C" { |
bogdanm | 86:04dd9b1680ae | 44 | #endif |
bogdanm | 86:04dd9b1680ae | 45 | |
bogdanm | 86:04dd9b1680ae | 46 | /* Includes ------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 47 | #include "stm32f3xx_hal_def.h" |
bogdanm | 86:04dd9b1680ae | 48 | |
bogdanm | 86:04dd9b1680ae | 49 | /** @addtogroup STM32F3xx_HAL_Driver |
bogdanm | 86:04dd9b1680ae | 50 | * @{ |
bogdanm | 86:04dd9b1680ae | 51 | */ |
bogdanm | 86:04dd9b1680ae | 52 | |
bogdanm | 86:04dd9b1680ae | 53 | /** @addtogroup PWREx |
bogdanm | 86:04dd9b1680ae | 54 | * @{ |
bogdanm | 86:04dd9b1680ae | 55 | */ |
bogdanm | 86:04dd9b1680ae | 56 | |
bogdanm | 86:04dd9b1680ae | 57 | /* Exported types ------------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 58 | |
bogdanm | 92:4fc01daae5a5 | 59 | /** @defgroup PWREx_Exported_Types PWR Extended Exported Types |
bogdanm | 92:4fc01daae5a5 | 60 | * @{ |
bogdanm | 92:4fc01daae5a5 | 61 | */ |
bogdanm | 92:4fc01daae5a5 | 62 | #if defined(STM32F302xE) || defined(STM32F303xE) || \ |
bogdanm | 92:4fc01daae5a5 | 63 | defined(STM32F302xC) || defined(STM32F303xC) || \ |
bogdanm | 92:4fc01daae5a5 | 64 | defined(STM32F303x8) || defined(STM32F334x8) || \ |
bogdanm | 92:4fc01daae5a5 | 65 | defined(STM32F301x8) || defined(STM32F302x8) || \ |
bogdanm | 92:4fc01daae5a5 | 66 | defined(STM32F373xC) |
bogdanm | 86:04dd9b1680ae | 67 | /** |
bogdanm | 86:04dd9b1680ae | 68 | * @brief PWR PVD configuration structure definition |
bogdanm | 86:04dd9b1680ae | 69 | */ |
bogdanm | 86:04dd9b1680ae | 70 | typedef struct |
bogdanm | 86:04dd9b1680ae | 71 | { |
bogdanm | 86:04dd9b1680ae | 72 | uint32_t PVDLevel; /*!< PVDLevel: Specifies the PVD detection level |
bogdanm | 86:04dd9b1680ae | 73 | This parameter can be a value of @ref PWREx_PVD_detection_level */ |
bogdanm | 86:04dd9b1680ae | 74 | |
bogdanm | 86:04dd9b1680ae | 75 | uint32_t Mode; /*!< Mode: Specifies the operating mode for the selected pins. |
bogdanm | 86:04dd9b1680ae | 76 | This parameter can be a value of @ref PWREx_PVD_Mode */ |
bogdanm | 86:04dd9b1680ae | 77 | }PWR_PVDTypeDef; |
bogdanm | 92:4fc01daae5a5 | 78 | #endif /* STM32F302xE || STM32F303xE || */ |
bogdanm | 92:4fc01daae5a5 | 79 | /* STM32F302xC || STM32F303xC || */ |
bogdanm | 92:4fc01daae5a5 | 80 | /* STM32F303x8 || STM32F334x8 || */ |
bogdanm | 92:4fc01daae5a5 | 81 | /* STM32F301x8 || STM32F302x8 || */ |
bogdanm | 92:4fc01daae5a5 | 82 | /* STM32F373xC */ |
bogdanm | 92:4fc01daae5a5 | 83 | |
bogdanm | 92:4fc01daae5a5 | 84 | /** |
bogdanm | 92:4fc01daae5a5 | 85 | * @} |
bogdanm | 92:4fc01daae5a5 | 86 | */ |
bogdanm | 86:04dd9b1680ae | 87 | |
bogdanm | 86:04dd9b1680ae | 88 | /* Exported constants --------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 89 | /** @defgroup PWREx_Exported_Constants PWR Extended Exported Constants |
bogdanm | 86:04dd9b1680ae | 90 | * @{ |
bogdanm | 86:04dd9b1680ae | 91 | */ |
bogdanm | 86:04dd9b1680ae | 92 | |
bogdanm | 92:4fc01daae5a5 | 93 | #if defined(STM32F302xE) || defined(STM32F303xE) || \ |
bogdanm | 92:4fc01daae5a5 | 94 | defined(STM32F302xC) || defined(STM32F303xC) || \ |
bogdanm | 92:4fc01daae5a5 | 95 | defined(STM32F303x8) || defined(STM32F334x8) || \ |
bogdanm | 92:4fc01daae5a5 | 96 | defined(STM32F301x8) || defined(STM32F302x8) || \ |
bogdanm | 92:4fc01daae5a5 | 97 | defined(STM32F373xC) |
bogdanm | 92:4fc01daae5a5 | 98 | |
bogdanm | 92:4fc01daae5a5 | 99 | /** @defgroup PWREx_PVD_detection_level PWR Extended PVD detection level |
bogdanm | 86:04dd9b1680ae | 100 | * @{ |
bogdanm | 86:04dd9b1680ae | 101 | */ |
bogdanm | 86:04dd9b1680ae | 102 | #define PWR_PVDLEVEL_0 PWR_CR_PLS_LEV0 |
bogdanm | 86:04dd9b1680ae | 103 | #define PWR_PVDLEVEL_1 PWR_CR_PLS_LEV1 |
bogdanm | 86:04dd9b1680ae | 104 | #define PWR_PVDLEVEL_2 PWR_CR_PLS_LEV2 |
bogdanm | 86:04dd9b1680ae | 105 | #define PWR_PVDLEVEL_3 PWR_CR_PLS_LEV3 |
bogdanm | 86:04dd9b1680ae | 106 | #define PWR_PVDLEVEL_4 PWR_CR_PLS_LEV4 |
bogdanm | 86:04dd9b1680ae | 107 | #define PWR_PVDLEVEL_5 PWR_CR_PLS_LEV5 |
bogdanm | 86:04dd9b1680ae | 108 | #define PWR_PVDLEVEL_6 PWR_CR_PLS_LEV6 |
bogdanm | 86:04dd9b1680ae | 109 | #define PWR_PVDLEVEL_7 PWR_CR_PLS_LEV7 |
bogdanm | 86:04dd9b1680ae | 110 | #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \ |
bogdanm | 86:04dd9b1680ae | 111 | ((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \ |
bogdanm | 86:04dd9b1680ae | 112 | ((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \ |
bogdanm | 86:04dd9b1680ae | 113 | ((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7)) |
bogdanm | 86:04dd9b1680ae | 114 | /** |
bogdanm | 86:04dd9b1680ae | 115 | * @} |
bogdanm | 86:04dd9b1680ae | 116 | */ |
bogdanm | 86:04dd9b1680ae | 117 | |
bogdanm | 92:4fc01daae5a5 | 118 | /** @defgroup PWREx_PVD_Mode PWR Extended PVD Mode |
bogdanm | 86:04dd9b1680ae | 119 | * @{ |
bogdanm | 86:04dd9b1680ae | 120 | */ |
bogdanm | 92:4fc01daae5a5 | 121 | #define PWR_PVD_MODE_NORMAL ((uint32_t)0x00000000) /*!< basic mode is used */ |
bogdanm | 92:4fc01daae5a5 | 122 | #define PWR_PVD_MODE_IT_RISING ((uint32_t)0x00010001) /*!< External Interrupt Mode with Rising edge trigger detection */ |
bogdanm | 92:4fc01daae5a5 | 123 | #define PWR_PVD_MODE_IT_FALLING ((uint32_t)0x00010002) /*!< External Interrupt Mode with Falling edge trigger detection */ |
bogdanm | 92:4fc01daae5a5 | 124 | #define PWR_PVD_MODE_IT_RISING_FALLING ((uint32_t)0x00010003) /*!< External Interrupt Mode with Rising/Falling edge trigger detection */ |
bogdanm | 92:4fc01daae5a5 | 125 | #define PWR_PVD_MODE_EVENT_RISING ((uint32_t)0x00020001) /*!< Event Mode with Rising edge trigger detection */ |
bogdanm | 92:4fc01daae5a5 | 126 | #define PWR_PVD_MODE_EVENT_FALLING ((uint32_t)0x00020002) /*!< Event Mode with Falling edge trigger detection */ |
bogdanm | 92:4fc01daae5a5 | 127 | #define PWR_PVD_MODE_EVENT_RISING_FALLING ((uint32_t)0x00020003) /*!< Event Mode with Rising/Falling edge trigger detection */ |
bogdanm | 92:4fc01daae5a5 | 128 | |
bogdanm | 92:4fc01daae5a5 | 129 | #define IS_PWR_PVD_MODE(MODE) (((MODE) == PWR_PVD_MODE_IT_RISING)|| ((MODE) == PWR_PVD_MODE_IT_FALLING) || \ |
bogdanm | 92:4fc01daae5a5 | 130 | ((MODE) == PWR_PVD_MODE_IT_RISING_FALLING) || ((MODE) == PWR_PVD_MODE_EVENT_RISING) || \ |
bogdanm | 92:4fc01daae5a5 | 131 | ((MODE) == PWR_PVD_MODE_EVENT_FALLING) || ((MODE) == PWR_PVD_MODE_EVENT_RISING_FALLING) || \ |
bogdanm | 92:4fc01daae5a5 | 132 | ((MODE) == PWR_PVD_MODE_NORMAL)) |
bogdanm | 86:04dd9b1680ae | 133 | /** |
bogdanm | 86:04dd9b1680ae | 134 | * @} |
bogdanm | 86:04dd9b1680ae | 135 | */ |
bogdanm | 86:04dd9b1680ae | 136 | |
bogdanm | 86:04dd9b1680ae | 137 | #define PWR_EXTI_LINE_PVD ((uint32_t)0x00010000) /*!< External interrupt line 16 Connected to the PVD EXTI Line */ |
bogdanm | 86:04dd9b1680ae | 138 | |
bogdanm | 92:4fc01daae5a5 | 139 | #endif /* STM32F302xE || STM32F303xE || */ |
bogdanm | 92:4fc01daae5a5 | 140 | /* STM32F302xC || STM32F303xC || */ |
bogdanm | 92:4fc01daae5a5 | 141 | /* STM32F303x8 || STM32F334x8 || */ |
bogdanm | 92:4fc01daae5a5 | 142 | /* STM32F301x8 || STM32F302x8 || */ |
bogdanm | 92:4fc01daae5a5 | 143 | /* STM32F373xC */ |
bogdanm | 86:04dd9b1680ae | 144 | |
bogdanm | 86:04dd9b1680ae | 145 | #if defined(STM32F373xC) || defined(STM32F378xx) |
bogdanm | 92:4fc01daae5a5 | 146 | /** @defgroup PWREx_SDADC_ANALOGx PWR Extended SDADC ANALOGx |
bogdanm | 86:04dd9b1680ae | 147 | * @{ |
bogdanm | 86:04dd9b1680ae | 148 | */ |
bogdanm | 86:04dd9b1680ae | 149 | #define PWR_SDADC_ANALOG1 ((uint32_t)PWR_CR_SDADC1EN) |
bogdanm | 86:04dd9b1680ae | 150 | #define PWR_SDADC_ANALOG2 ((uint32_t)PWR_CR_SDADC2EN) |
bogdanm | 86:04dd9b1680ae | 151 | #define PWR_SDADC_ANALOG3 ((uint32_t)PWR_CR_SDADC3EN) |
bogdanm | 86:04dd9b1680ae | 152 | #define IS_PWR_SDADC_ANALOG(SDADC) (((SDADC) == PWR_SDADC_ANALOG1) || \ |
bogdanm | 86:04dd9b1680ae | 153 | ((SDADC) == PWR_SDADC_ANALOG2) || \ |
bogdanm | 86:04dd9b1680ae | 154 | ((SDADC) == PWR_SDADC_ANALOG3)) |
bogdanm | 86:04dd9b1680ae | 155 | /** |
bogdanm | 86:04dd9b1680ae | 156 | * @} |
bogdanm | 86:04dd9b1680ae | 157 | */ |
bogdanm | 86:04dd9b1680ae | 158 | #endif /* STM32F373xC || STM32F378xx */ |
bogdanm | 86:04dd9b1680ae | 159 | |
bogdanm | 86:04dd9b1680ae | 160 | /** |
bogdanm | 86:04dd9b1680ae | 161 | * @} |
bogdanm | 86:04dd9b1680ae | 162 | */ |
bogdanm | 86:04dd9b1680ae | 163 | |
bogdanm | 86:04dd9b1680ae | 164 | /* Exported macro ------------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 165 | /** @defgroup PWREx_Exported_Macros PWR Extended Exported Macros |
bogdanm | 86:04dd9b1680ae | 166 | * @{ |
bogdanm | 86:04dd9b1680ae | 167 | */ |
bogdanm | 86:04dd9b1680ae | 168 | |
bogdanm | 92:4fc01daae5a5 | 169 | #if defined(STM32F302xE) || defined(STM32F303xE) || \ |
bogdanm | 92:4fc01daae5a5 | 170 | defined(STM32F302xC) || defined(STM32F303xC) || \ |
bogdanm | 92:4fc01daae5a5 | 171 | defined(STM32F303x8) || defined(STM32F334x8) || \ |
bogdanm | 92:4fc01daae5a5 | 172 | defined(STM32F301x8) || defined(STM32F302x8) || \ |
bogdanm | 92:4fc01daae5a5 | 173 | defined(STM32F373xC) |
bogdanm | 92:4fc01daae5a5 | 174 | |
bogdanm | 86:04dd9b1680ae | 175 | /** |
bogdanm | 92:4fc01daae5a5 | 176 | * @brief Enable interrupt on PVD Exti Line 16. |
bogdanm | 86:04dd9b1680ae | 177 | * @retval None. |
bogdanm | 86:04dd9b1680ae | 178 | */ |
bogdanm | 92:4fc01daae5a5 | 179 | #define __HAL_PWR_PVD_EXTI_ENABLE_IT() (EXTI->IMR |= (PWR_EXTI_LINE_PVD)) |
bogdanm | 86:04dd9b1680ae | 180 | |
bogdanm | 86:04dd9b1680ae | 181 | /** |
bogdanm | 92:4fc01daae5a5 | 182 | * @brief Disable interrupt on PVD Exti Line 16. |
bogdanm | 86:04dd9b1680ae | 183 | * @retval None. |
bogdanm | 86:04dd9b1680ae | 184 | */ |
bogdanm | 92:4fc01daae5a5 | 185 | #define __HAL_PWR_PVD_EXTI_DISABLE_IT() (EXTI->IMR &= ~(PWR_EXTI_LINE_PVD)) |
bogdanm | 86:04dd9b1680ae | 186 | |
bogdanm | 86:04dd9b1680ae | 187 | /** |
bogdanm | 86:04dd9b1680ae | 188 | * @brief Generate a Software interrupt on selected EXTI line. |
bogdanm | 92:4fc01daae5a5 | 189 | * @retval None. |
bogdanm | 92:4fc01daae5a5 | 190 | */ |
bogdanm | 92:4fc01daae5a5 | 191 | #define __HAL_PWR_PVD_EXTI_GENERATE_SWIT() (EXTI->SWIER |= (PWR_EXTI_LINE_PVD)) |
bogdanm | 92:4fc01daae5a5 | 192 | |
bogdanm | 92:4fc01daae5a5 | 193 | /** |
bogdanm | 92:4fc01daae5a5 | 194 | * @brief Enable event on PVD Exti Line 16. |
bogdanm | 92:4fc01daae5a5 | 195 | * @retval None. |
bogdanm | 92:4fc01daae5a5 | 196 | */ |
bogdanm | 92:4fc01daae5a5 | 197 | #define __HAL_PWR_PVD_EXTI_ENABLE_EVENT() (EXTI->EMR |= (PWR_EXTI_LINE_PVD)) |
bogdanm | 92:4fc01daae5a5 | 198 | |
bogdanm | 92:4fc01daae5a5 | 199 | /** |
bogdanm | 92:4fc01daae5a5 | 200 | * @brief Disable event on PVD Exti Line 16. |
bogdanm | 92:4fc01daae5a5 | 201 | * @retval None. |
bogdanm | 86:04dd9b1680ae | 202 | */ |
bogdanm | 92:4fc01daae5a5 | 203 | #define __HAL_PWR_PVD_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(PWR_EXTI_LINE_PVD)) |
bogdanm | 92:4fc01daae5a5 | 204 | |
bogdanm | 92:4fc01daae5a5 | 205 | /** |
bogdanm | 92:4fc01daae5a5 | 206 | * @brief PVD EXTI line configuration: clear falling edge trigger and set rising edge. |
bogdanm | 92:4fc01daae5a5 | 207 | * @retval None. |
bogdanm | 92:4fc01daae5a5 | 208 | */ |
bogdanm | 92:4fc01daae5a5 | 209 | #define __HAL_PWR_PVD_EXTI_CLEAR_EGDE_TRIGGER() EXTI->FTSR &= ~(PWR_EXTI_LINE_PVD); \ |
bogdanm | 92:4fc01daae5a5 | 210 | EXTI->RTSR &= ~(PWR_EXTI_LINE_PVD) |
bogdanm | 92:4fc01daae5a5 | 211 | |
bogdanm | 92:4fc01daae5a5 | 212 | /** |
bogdanm | 92:4fc01daae5a5 | 213 | * @brief PVD EXTI line configuration: set falling edge trigger. |
bogdanm | 92:4fc01daae5a5 | 214 | * @retval None. |
bogdanm | 92:4fc01daae5a5 | 215 | */ |
bogdanm | 92:4fc01daae5a5 | 216 | #define __HAL_PWR_PVD_EXTI_SET_FALLING_EGDE_TRIGGER() EXTI->FTSR |= (PWR_EXTI_LINE_PVD) |
bogdanm | 92:4fc01daae5a5 | 217 | |
bogdanm | 92:4fc01daae5a5 | 218 | /** |
bogdanm | 92:4fc01daae5a5 | 219 | * @brief PVD EXTI line configuration: set rising edge trigger. |
bogdanm | 92:4fc01daae5a5 | 220 | * @retval None. |
bogdanm | 92:4fc01daae5a5 | 221 | */ |
bogdanm | 92:4fc01daae5a5 | 222 | #define __HAL_PWR_PVD_EXTI_SET_RISING_EDGE_TRIGGER() EXTI->RTSR |= (PWR_EXTI_LINE_PVD) |
bogdanm | 86:04dd9b1680ae | 223 | |
bogdanm | 86:04dd9b1680ae | 224 | /** |
bogdanm | 86:04dd9b1680ae | 225 | * @brief Check whether the specified PVD EXTI interrupt flag is set or not. |
bogdanm | 86:04dd9b1680ae | 226 | * @retval EXTI PVD Line Status. |
bogdanm | 86:04dd9b1680ae | 227 | */ |
bogdanm | 92:4fc01daae5a5 | 228 | #define __HAL_PWR_PVD_EXTI_GET_FLAG() (EXTI->PR & (PWR_EXTI_LINE_PVD)) |
bogdanm | 86:04dd9b1680ae | 229 | |
bogdanm | 86:04dd9b1680ae | 230 | /** |
bogdanm | 86:04dd9b1680ae | 231 | * @brief Clear the PVD EXTI flag. |
bogdanm | 86:04dd9b1680ae | 232 | * @retval None. |
bogdanm | 86:04dd9b1680ae | 233 | */ |
bogdanm | 92:4fc01daae5a5 | 234 | #define __HAL_PWR_PVD_EXTI_CLEAR_FLAG() (EXTI->PR = (PWR_EXTI_LINE_PVD)) |
bogdanm | 92:4fc01daae5a5 | 235 | |
bogdanm | 92:4fc01daae5a5 | 236 | #endif /* STM32F302xE || STM32F303xE || */ |
bogdanm | 92:4fc01daae5a5 | 237 | /* STM32F302xC || STM32F303xC || */ |
bogdanm | 92:4fc01daae5a5 | 238 | /* STM32F303x8 || STM32F334x8 || */ |
bogdanm | 92:4fc01daae5a5 | 239 | /* STM32F301x8 || STM32F302x8 || */ |
bogdanm | 92:4fc01daae5a5 | 240 | /* STM32F373xC */ |
bogdanm | 86:04dd9b1680ae | 241 | |
bogdanm | 86:04dd9b1680ae | 242 | /** |
bogdanm | 86:04dd9b1680ae | 243 | * @} |
bogdanm | 86:04dd9b1680ae | 244 | */ |
bogdanm | 86:04dd9b1680ae | 245 | |
bogdanm | 86:04dd9b1680ae | 246 | /* Exported functions --------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 247 | |
bogdanm | 92:4fc01daae5a5 | 248 | /** @addtogroup PWREx_Exported_Functions PWR Extended Exported Functions |
bogdanm | 92:4fc01daae5a5 | 249 | * @{ |
bogdanm | 92:4fc01daae5a5 | 250 | */ |
bogdanm | 92:4fc01daae5a5 | 251 | |
bogdanm | 92:4fc01daae5a5 | 252 | /** @addtogroup PWREx_Exported_Functions_Group1 Peripheral Extended Control Functions |
bogdanm | 92:4fc01daae5a5 | 253 | * @{ |
bogdanm | 92:4fc01daae5a5 | 254 | */ |
bogdanm | 92:4fc01daae5a5 | 255 | /* Peripheral Extended control functions **************************************/ |
bogdanm | 92:4fc01daae5a5 | 256 | #if defined(STM32F302xE) || defined(STM32F303xE) || \ |
bogdanm | 92:4fc01daae5a5 | 257 | defined(STM32F302xC) || defined(STM32F303xC) || \ |
bogdanm | 92:4fc01daae5a5 | 258 | defined(STM32F303x8) || defined(STM32F334x8) || \ |
bogdanm | 92:4fc01daae5a5 | 259 | defined(STM32F301x8) || defined(STM32F302x8) || \ |
bogdanm | 92:4fc01daae5a5 | 260 | defined(STM32F373xC) |
bogdanm | 86:04dd9b1680ae | 261 | void HAL_PWR_PVDConfig(PWR_PVDTypeDef *sConfigPVD); |
bogdanm | 86:04dd9b1680ae | 262 | void HAL_PWR_EnablePVD(void); |
bogdanm | 86:04dd9b1680ae | 263 | void HAL_PWR_DisablePVD(void); |
bogdanm | 86:04dd9b1680ae | 264 | void HAL_PWR_PVD_IRQHandler(void); |
bogdanm | 86:04dd9b1680ae | 265 | void HAL_PWR_PVDCallback(void); |
bogdanm | 92:4fc01daae5a5 | 266 | #endif /* STM32F302xE || STM32F303xE || */ |
bogdanm | 92:4fc01daae5a5 | 267 | /* STM32F302xC || STM32F303xC || */ |
bogdanm | 92:4fc01daae5a5 | 268 | /* STM32F303x8 || STM32F334x8 || */ |
bogdanm | 92:4fc01daae5a5 | 269 | /* STM32F301x8 || STM32F302x8 || */ |
bogdanm | 92:4fc01daae5a5 | 270 | /* STM32F373xC */ |
bogdanm | 86:04dd9b1680ae | 271 | |
bogdanm | 86:04dd9b1680ae | 272 | #if defined(STM32F373xC) || defined(STM32F378xx) |
bogdanm | 86:04dd9b1680ae | 273 | void HAL_PWREx_EnableSDADCAnalog(uint32_t Analogx); |
bogdanm | 86:04dd9b1680ae | 274 | void HAL_PWREx_DisableSDADCAnalog(uint32_t Analogx); |
bogdanm | 86:04dd9b1680ae | 275 | #endif /* STM32F373xC || STM32F378xx */ |
bogdanm | 86:04dd9b1680ae | 276 | |
bogdanm | 86:04dd9b1680ae | 277 | /** |
bogdanm | 86:04dd9b1680ae | 278 | * @} |
bogdanm | 86:04dd9b1680ae | 279 | */ |
bogdanm | 86:04dd9b1680ae | 280 | |
bogdanm | 86:04dd9b1680ae | 281 | /** |
bogdanm | 86:04dd9b1680ae | 282 | * @} |
bogdanm | 86:04dd9b1680ae | 283 | */ |
bogdanm | 86:04dd9b1680ae | 284 | |
bogdanm | 92:4fc01daae5a5 | 285 | /** |
bogdanm | 92:4fc01daae5a5 | 286 | * @} |
bogdanm | 92:4fc01daae5a5 | 287 | */ |
bogdanm | 92:4fc01daae5a5 | 288 | |
bogdanm | 92:4fc01daae5a5 | 289 | /** |
bogdanm | 92:4fc01daae5a5 | 290 | * @} |
bogdanm | 92:4fc01daae5a5 | 291 | */ |
bogdanm | 92:4fc01daae5a5 | 292 | |
bogdanm | 86:04dd9b1680ae | 293 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 294 | } |
bogdanm | 86:04dd9b1680ae | 295 | #endif |
bogdanm | 86:04dd9b1680ae | 296 | |
bogdanm | 86:04dd9b1680ae | 297 | #endif /* __STM32F3xx_HAL_PWR_EX_H */ |
bogdanm | 86:04dd9b1680ae | 298 | |
bogdanm | 86:04dd9b1680ae | 299 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |