TUKS MCU Introductory course / TUKS-COURSE-TIMER
Committer:
elmot
Date:
Fri Feb 24 21:13:56 2017 +0000
Revision:
1:d0dfbce63a89
Ready-to-copy

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elmot 1:d0dfbce63a89 1 /**
elmot 1:d0dfbce63a89 2 ******************************************************************************
elmot 1:d0dfbce63a89 3 * @file stm32l4xx_ll_pwr.h
elmot 1:d0dfbce63a89 4 * @author MCD Application Team
elmot 1:d0dfbce63a89 5 * @version V1.5.1
elmot 1:d0dfbce63a89 6 * @date 31-May-2016
elmot 1:d0dfbce63a89 7 * @brief Header file of PWR LL module.
elmot 1:d0dfbce63a89 8 ******************************************************************************
elmot 1:d0dfbce63a89 9 * @attention
elmot 1:d0dfbce63a89 10 *
elmot 1:d0dfbce63a89 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
elmot 1:d0dfbce63a89 12 *
elmot 1:d0dfbce63a89 13 * Redistribution and use in source and binary forms, with or without modification,
elmot 1:d0dfbce63a89 14 * are permitted provided that the following conditions are met:
elmot 1:d0dfbce63a89 15 * 1. Redistributions of source code must retain the above copyright notice,
elmot 1:d0dfbce63a89 16 * this list of conditions and the following disclaimer.
elmot 1:d0dfbce63a89 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
elmot 1:d0dfbce63a89 18 * this list of conditions and the following disclaimer in the documentation
elmot 1:d0dfbce63a89 19 * and/or other materials provided with the distribution.
elmot 1:d0dfbce63a89 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
elmot 1:d0dfbce63a89 21 * may be used to endorse or promote products derived from this software
elmot 1:d0dfbce63a89 22 * without specific prior written permission.
elmot 1:d0dfbce63a89 23 *
elmot 1:d0dfbce63a89 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
elmot 1:d0dfbce63a89 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
elmot 1:d0dfbce63a89 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
elmot 1:d0dfbce63a89 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
elmot 1:d0dfbce63a89 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
elmot 1:d0dfbce63a89 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
elmot 1:d0dfbce63a89 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
elmot 1:d0dfbce63a89 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
elmot 1:d0dfbce63a89 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
elmot 1:d0dfbce63a89 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
elmot 1:d0dfbce63a89 34 *
elmot 1:d0dfbce63a89 35 ******************************************************************************
elmot 1:d0dfbce63a89 36 */
elmot 1:d0dfbce63a89 37
elmot 1:d0dfbce63a89 38 /* Define to prevent recursive inclusion -------------------------------------*/
elmot 1:d0dfbce63a89 39 #ifndef __STM32L4xx_LL_PWR_H
elmot 1:d0dfbce63a89 40 #define __STM32L4xx_LL_PWR_H
elmot 1:d0dfbce63a89 41
elmot 1:d0dfbce63a89 42 #ifdef __cplusplus
elmot 1:d0dfbce63a89 43 extern "C" {
elmot 1:d0dfbce63a89 44 #endif
elmot 1:d0dfbce63a89 45
elmot 1:d0dfbce63a89 46 /* Includes ------------------------------------------------------------------*/
elmot 1:d0dfbce63a89 47 #include "stm32l4xx.h"
elmot 1:d0dfbce63a89 48
elmot 1:d0dfbce63a89 49 /** @addtogroup STM32L4xx_LL_Driver
elmot 1:d0dfbce63a89 50 * @{
elmot 1:d0dfbce63a89 51 */
elmot 1:d0dfbce63a89 52
elmot 1:d0dfbce63a89 53 #if defined(PWR)
elmot 1:d0dfbce63a89 54
elmot 1:d0dfbce63a89 55 /** @defgroup PWR_LL PWR
elmot 1:d0dfbce63a89 56 * @{
elmot 1:d0dfbce63a89 57 */
elmot 1:d0dfbce63a89 58
elmot 1:d0dfbce63a89 59 /* Private types -------------------------------------------------------------*/
elmot 1:d0dfbce63a89 60 /* Private variables ---------------------------------------------------------*/
elmot 1:d0dfbce63a89 61
elmot 1:d0dfbce63a89 62 /* Private constants ---------------------------------------------------------*/
elmot 1:d0dfbce63a89 63
elmot 1:d0dfbce63a89 64 /* Private macros ------------------------------------------------------------*/
elmot 1:d0dfbce63a89 65
elmot 1:d0dfbce63a89 66 /* Exported types ------------------------------------------------------------*/
elmot 1:d0dfbce63a89 67 /* Exported constants --------------------------------------------------------*/
elmot 1:d0dfbce63a89 68 /** @defgroup PWR_LL_Exported_Constants PWR Exported Constants
elmot 1:d0dfbce63a89 69 * @{
elmot 1:d0dfbce63a89 70 */
elmot 1:d0dfbce63a89 71
elmot 1:d0dfbce63a89 72 /** @defgroup PWR_LL_EC_CLEAR_FLAG Clear Flags Defines
elmot 1:d0dfbce63a89 73 * @brief Flags defines which can be used with LL_PWR_WriteReg function
elmot 1:d0dfbce63a89 74 * @{
elmot 1:d0dfbce63a89 75 */
elmot 1:d0dfbce63a89 76 #define LL_PWR_SCR_CSBF PWR_SCR_CSBF
elmot 1:d0dfbce63a89 77 #define LL_PWR_SCR_CWUF PWR_SCR_CWUF
elmot 1:d0dfbce63a89 78 #define LL_PWR_SCR_CWUF5 PWR_SCR_CWUF5
elmot 1:d0dfbce63a89 79 #define LL_PWR_SCR_CWUF4 PWR_SCR_CWUF4
elmot 1:d0dfbce63a89 80 #define LL_PWR_SCR_CWUF3 PWR_SCR_CWUF3
elmot 1:d0dfbce63a89 81 #define LL_PWR_SCR_CWUF2 PWR_SCR_CWUF2
elmot 1:d0dfbce63a89 82 #define LL_PWR_SCR_CWUF1 PWR_SCR_CWUF1
elmot 1:d0dfbce63a89 83 /**
elmot 1:d0dfbce63a89 84 * @}
elmot 1:d0dfbce63a89 85 */
elmot 1:d0dfbce63a89 86
elmot 1:d0dfbce63a89 87 /** @defgroup PWR_LL_EC_GET_FLAG Get Flags Defines
elmot 1:d0dfbce63a89 88 * @brief Flags defines which can be used with LL_PWR_ReadReg function
elmot 1:d0dfbce63a89 89 * @{
elmot 1:d0dfbce63a89 90 */
elmot 1:d0dfbce63a89 91 #define LL_PWR_SR1_WUFI PWR_SR1_WUFI
elmot 1:d0dfbce63a89 92 #define LL_PWR_SR1_SBF PWR_SR1_SBF
elmot 1:d0dfbce63a89 93 #define LL_PWR_SR1_WUF5 PWR_SR1_WUF5
elmot 1:d0dfbce63a89 94 #define LL_PWR_SR1_WUF4 PWR_SR1_WUF4
elmot 1:d0dfbce63a89 95 #define LL_PWR_SR1_WUF3 PWR_SR1_WUF3
elmot 1:d0dfbce63a89 96 #define LL_PWR_SR1_WUF2 PWR_SR1_WUF2
elmot 1:d0dfbce63a89 97 #define LL_PWR_SR1_WUF1 PWR_SR1_WUF1
elmot 1:d0dfbce63a89 98 #define LL_PWR_SR2_PVMO4 PWR_SR2_PVMO4
elmot 1:d0dfbce63a89 99 #define LL_PWR_SR2_PVMO3 PWR_SR2_PVMO3
elmot 1:d0dfbce63a89 100 #if defined(PWR_SR2_PVMO2)
elmot 1:d0dfbce63a89 101 #define LL_PWR_SR2_PVMO2 PWR_SR2_PVMO2
elmot 1:d0dfbce63a89 102 #endif /* PWR_SR2_PVMO2 */
elmot 1:d0dfbce63a89 103 #define LL_PWR_SR2_PVMO1 PWR_SR2_PVMO1
elmot 1:d0dfbce63a89 104 #define LL_PWR_SR2_PVDO PWR_SR2_PVDO
elmot 1:d0dfbce63a89 105 #define LL_PWR_SR2_VOSF PWR_SR2_VOSF
elmot 1:d0dfbce63a89 106 #define LL_PWR_SR2_REGLPF PWR_SR2_REGLPF
elmot 1:d0dfbce63a89 107 #define LL_PWR_SR2_REGLPS PWR_SR2_REGLPS
elmot 1:d0dfbce63a89 108 /**
elmot 1:d0dfbce63a89 109 * @}
elmot 1:d0dfbce63a89 110 */
elmot 1:d0dfbce63a89 111
elmot 1:d0dfbce63a89 112 /** @defgroup PWR_LL_EC_REGU_VOLTAGE REGU VOLTAGE
elmot 1:d0dfbce63a89 113 * @{
elmot 1:d0dfbce63a89 114 */
elmot 1:d0dfbce63a89 115 #define LL_PWR_REGU_VOLTAGE_SCALE1 (PWR_CR1_VOS_0)
elmot 1:d0dfbce63a89 116 #define LL_PWR_REGU_VOLTAGE_SCALE2 (PWR_CR1_VOS_1)
elmot 1:d0dfbce63a89 117 /**
elmot 1:d0dfbce63a89 118 * @}
elmot 1:d0dfbce63a89 119 */
elmot 1:d0dfbce63a89 120
elmot 1:d0dfbce63a89 121 /** @defgroup PWR_LL_EC_MODE_PWR MODE PWR
elmot 1:d0dfbce63a89 122 * @{
elmot 1:d0dfbce63a89 123 */
elmot 1:d0dfbce63a89 124 #define LL_PWR_MODE_STOP0 (PWR_CR1_LPMS_STOP0)
elmot 1:d0dfbce63a89 125 #define LL_PWR_MODE_STOP1 (PWR_CR1_LPMS_STOP1)
elmot 1:d0dfbce63a89 126 #define LL_PWR_MODE_STOP2 (PWR_CR1_LPMS_STOP2)
elmot 1:d0dfbce63a89 127 #define LL_PWR_MODE_STANDBY (PWR_CR1_LPMS_STANDBY)
elmot 1:d0dfbce63a89 128 #define LL_PWR_MODE_SHUTDOWN (PWR_CR1_LPMS_SHUTDOWN)
elmot 1:d0dfbce63a89 129 /**
elmot 1:d0dfbce63a89 130 * @}
elmot 1:d0dfbce63a89 131 */
elmot 1:d0dfbce63a89 132
elmot 1:d0dfbce63a89 133 /** @defgroup PWR_LL_EC_PVM_VDDUSB_1 PVM VDDUSB 1
elmot 1:d0dfbce63a89 134 * @{
elmot 1:d0dfbce63a89 135 */
elmot 1:d0dfbce63a89 136 #if defined(USB_OTG_FS)
elmot 1:d0dfbce63a89 137 #define LL_PWR_PVM_VDDUSB_1_2V (PWR_CR2_PVME1) /* Monitoring VDDUSB vs. 1.2V */
elmot 1:d0dfbce63a89 138 #endif /* USB_OTG_FS */
elmot 1:d0dfbce63a89 139 #if defined(PWR_CR2_PVME2)
elmot 1:d0dfbce63a89 140 #define LL_PWR_PVM_VDDIO2_0_9V (PWR_CR2_PVME2) /* Monitoring VDDIO2 vs. 0.9V */
elmot 1:d0dfbce63a89 141 #endif /* PWR_CR2_PVME2 */
elmot 1:d0dfbce63a89 142 #define LL_PWR_PVM_VDDA_1_62V (PWR_CR2_PVME3) /* Monitoring VDDA vs. 1.62V */
elmot 1:d0dfbce63a89 143 #define LL_PWR_PVM_VDDA_2_2V (PWR_CR2_PVME4) /* Monitoring VDDA vs. 2.2V */
elmot 1:d0dfbce63a89 144 /**
elmot 1:d0dfbce63a89 145 * @}
elmot 1:d0dfbce63a89 146 */
elmot 1:d0dfbce63a89 147
elmot 1:d0dfbce63a89 148 /** @defgroup PWR_LL_EC_PVDLEVEL PVDLEVEL
elmot 1:d0dfbce63a89 149 * @{
elmot 1:d0dfbce63a89 150 */
elmot 1:d0dfbce63a89 151 #define LL_PWR_PVDLEVEL_0 (PWR_CR2_PLS_LEV0) /* VPVD0 around 2.0 V */
elmot 1:d0dfbce63a89 152 #define LL_PWR_PVDLEVEL_1 (PWR_CR2_PLS_LEV1) /* VPVD1 around 2.2 V */
elmot 1:d0dfbce63a89 153 #define LL_PWR_PVDLEVEL_2 (PWR_CR2_PLS_LEV2) /* VPVD2 around 2.4 V */
elmot 1:d0dfbce63a89 154 #define LL_PWR_PVDLEVEL_3 (PWR_CR2_PLS_LEV3) /* VPVD3 around 2.5 V */
elmot 1:d0dfbce63a89 155 #define LL_PWR_PVDLEVEL_4 (PWR_CR2_PLS_LEV4) /* VPVD4 around 2.6 V */
elmot 1:d0dfbce63a89 156 #define LL_PWR_PVDLEVEL_5 (PWR_CR2_PLS_LEV5) /* VPVD5 around 2.8 V */
elmot 1:d0dfbce63a89 157 #define LL_PWR_PVDLEVEL_6 (PWR_CR2_PLS_LEV6) /* VPVD6 around 2.9 V */
elmot 1:d0dfbce63a89 158 #define LL_PWR_PVDLEVEL_7 (PWR_CR2_PLS_LEV7) /* External input analog voltage (Compare internally to VREFINT) */
elmot 1:d0dfbce63a89 159 /**
elmot 1:d0dfbce63a89 160 * @}
elmot 1:d0dfbce63a89 161 */
elmot 1:d0dfbce63a89 162
elmot 1:d0dfbce63a89 163 /** @defgroup PWR_LL_EC_WAKEUP WAKEUP
elmot 1:d0dfbce63a89 164 * @{
elmot 1:d0dfbce63a89 165 */
elmot 1:d0dfbce63a89 166 #define LL_PWR_WAKEUP_PIN1 (PWR_CR3_EWUP1)
elmot 1:d0dfbce63a89 167 #define LL_PWR_WAKEUP_PIN2 (PWR_CR3_EWUP2)
elmot 1:d0dfbce63a89 168 #define LL_PWR_WAKEUP_PIN3 (PWR_CR3_EWUP3)
elmot 1:d0dfbce63a89 169 #define LL_PWR_WAKEUP_PIN4 (PWR_CR3_EWUP4)
elmot 1:d0dfbce63a89 170 #define LL_PWR_WAKEUP_PIN5 (PWR_CR3_EWUP5)
elmot 1:d0dfbce63a89 171 /**
elmot 1:d0dfbce63a89 172 * @}
elmot 1:d0dfbce63a89 173 */
elmot 1:d0dfbce63a89 174
elmot 1:d0dfbce63a89 175 /** @defgroup PWR_LL_EC_BATT_CHARG_RESISTOR BATT CHARG RESISTOR
elmot 1:d0dfbce63a89 176 * @{
elmot 1:d0dfbce63a89 177 */
elmot 1:d0dfbce63a89 178 #define LL_PWR_BATT_CHARG_RESISTOR_5K ((uint32_t)0x00000000)
elmot 1:d0dfbce63a89 179 #define LL_PWR_BATT_CHARGRESISTOR_1_5K (PWR_CR4_VBRS)
elmot 1:d0dfbce63a89 180 /**
elmot 1:d0dfbce63a89 181 * @}
elmot 1:d0dfbce63a89 182 */
elmot 1:d0dfbce63a89 183
elmot 1:d0dfbce63a89 184 /** @defgroup PWR_LL_EC_GPIO GPIO
elmot 1:d0dfbce63a89 185 * @{
elmot 1:d0dfbce63a89 186 */
elmot 1:d0dfbce63a89 187 #define LL_PWR_GPIO_A ((uint32_t)(&(PWR->PUCRA)))
elmot 1:d0dfbce63a89 188 #define LL_PWR_GPIO_B ((uint32_t)(&(PWR->PUCRB)))
elmot 1:d0dfbce63a89 189 #define LL_PWR_GPIO_C ((uint32_t)(&(PWR->PUCRC)))
elmot 1:d0dfbce63a89 190 #define LL_PWR_GPIO_D ((uint32_t)(&(PWR->PUCRD)))
elmot 1:d0dfbce63a89 191 #define LL_PWR_GPIO_E ((uint32_t)(&(PWR->PUCRE)))
elmot 1:d0dfbce63a89 192 #if defined(GPIOF)
elmot 1:d0dfbce63a89 193 #define LL_PWR_GPIO_F ((uint32_t)(&(PWR->PUCRF)))
elmot 1:d0dfbce63a89 194 #endif /* GPIOF */
elmot 1:d0dfbce63a89 195 #if defined(GPIOG)
elmot 1:d0dfbce63a89 196 #define LL_PWR_GPIO_G ((uint32_t)(&(PWR->PUCRG)))
elmot 1:d0dfbce63a89 197 #endif /* GPIOG */
elmot 1:d0dfbce63a89 198 #define LL_PWR_GPIO_H ((uint32_t)(&(PWR->PUCRH)))
elmot 1:d0dfbce63a89 199 /**
elmot 1:d0dfbce63a89 200 * @}
elmot 1:d0dfbce63a89 201 */
elmot 1:d0dfbce63a89 202
elmot 1:d0dfbce63a89 203 /** @defgroup PWR_LL_EC_GPIO_BIT GPIO BIT
elmot 1:d0dfbce63a89 204 * @{
elmot 1:d0dfbce63a89 205 */
elmot 1:d0dfbce63a89 206 #define LL_PWR_GPIO_BIT_0 ((uint32_t)0x00000001)
elmot 1:d0dfbce63a89 207 #define LL_PWR_GPIO_BIT_1 ((uint32_t)0x00000002)
elmot 1:d0dfbce63a89 208 #define LL_PWR_GPIO_BIT_2 ((uint32_t)0x00000004)
elmot 1:d0dfbce63a89 209 #define LL_PWR_GPIO_BIT_3 ((uint32_t)0x00000008)
elmot 1:d0dfbce63a89 210 #define LL_PWR_GPIO_BIT_4 ((uint32_t)0x00000010)
elmot 1:d0dfbce63a89 211 #define LL_PWR_GPIO_BIT_5 ((uint32_t)0x00000020)
elmot 1:d0dfbce63a89 212 #define LL_PWR_GPIO_BIT_6 ((uint32_t)0x00000040)
elmot 1:d0dfbce63a89 213 #define LL_PWR_GPIO_BIT_7 ((uint32_t)0x00000080)
elmot 1:d0dfbce63a89 214 #define LL_PWR_GPIO_BIT_8 ((uint32_t)0x00000100)
elmot 1:d0dfbce63a89 215 #define LL_PWR_GPIO_BIT_9 ((uint32_t)0x00000200)
elmot 1:d0dfbce63a89 216 #define LL_PWR_GPIO_BIT_10 ((uint32_t)0x00000400)
elmot 1:d0dfbce63a89 217 #define LL_PWR_GPIO_BIT_11 ((uint32_t)0x00000800)
elmot 1:d0dfbce63a89 218 #define LL_PWR_GPIO_BIT_12 ((uint32_t)0x00001000)
elmot 1:d0dfbce63a89 219 #define LL_PWR_GPIO_BIT_13 ((uint32_t)0x00002000)
elmot 1:d0dfbce63a89 220 #define LL_PWR_GPIO_BIT_14 ((uint32_t)0x00004000)
elmot 1:d0dfbce63a89 221 #define LL_PWR_GPIO_BIT_15 ((uint32_t)0x00008000)
elmot 1:d0dfbce63a89 222 /**
elmot 1:d0dfbce63a89 223 * @}
elmot 1:d0dfbce63a89 224 */
elmot 1:d0dfbce63a89 225
elmot 1:d0dfbce63a89 226 /**
elmot 1:d0dfbce63a89 227 * @}
elmot 1:d0dfbce63a89 228 */
elmot 1:d0dfbce63a89 229
elmot 1:d0dfbce63a89 230 /* Exported macro ------------------------------------------------------------*/
elmot 1:d0dfbce63a89 231 /** @defgroup PWR_LL_Exported_Macros PWR Exported Macros
elmot 1:d0dfbce63a89 232 * @{
elmot 1:d0dfbce63a89 233 */
elmot 1:d0dfbce63a89 234
elmot 1:d0dfbce63a89 235 /** @defgroup PWR_LL_EM_WRITE_READ Common Write and read registers Macros
elmot 1:d0dfbce63a89 236 * @{
elmot 1:d0dfbce63a89 237 */
elmot 1:d0dfbce63a89 238
elmot 1:d0dfbce63a89 239 /**
elmot 1:d0dfbce63a89 240 * @brief Write a value in PWR register
elmot 1:d0dfbce63a89 241 * @param __REG__ Register to be written
elmot 1:d0dfbce63a89 242 * @param __VALUE__ Value to be written in the register
elmot 1:d0dfbce63a89 243 * @retval None
elmot 1:d0dfbce63a89 244 */
elmot 1:d0dfbce63a89 245 #define LL_PWR_WriteReg(__REG__, __VALUE__) WRITE_REG(PWR->__REG__, (__VALUE__))
elmot 1:d0dfbce63a89 246
elmot 1:d0dfbce63a89 247 /**
elmot 1:d0dfbce63a89 248 * @brief Read a value in PWR register
elmot 1:d0dfbce63a89 249 * @param __REG__ Register to be read
elmot 1:d0dfbce63a89 250 * @retval Register value
elmot 1:d0dfbce63a89 251 */
elmot 1:d0dfbce63a89 252 #define LL_PWR_ReadReg(__REG__) READ_REG(PWR->__REG__)
elmot 1:d0dfbce63a89 253 /**
elmot 1:d0dfbce63a89 254 * @}
elmot 1:d0dfbce63a89 255 */
elmot 1:d0dfbce63a89 256
elmot 1:d0dfbce63a89 257 /**
elmot 1:d0dfbce63a89 258 * @}
elmot 1:d0dfbce63a89 259 */
elmot 1:d0dfbce63a89 260
elmot 1:d0dfbce63a89 261
elmot 1:d0dfbce63a89 262 /* Exported functions --------------------------------------------------------*/
elmot 1:d0dfbce63a89 263 /** @defgroup PWR_LL_Exported_Functions PWR Exported Functions
elmot 1:d0dfbce63a89 264 * @{
elmot 1:d0dfbce63a89 265 */
elmot 1:d0dfbce63a89 266
elmot 1:d0dfbce63a89 267 /** @defgroup PWR_LL_EF_Configuration Configuration
elmot 1:d0dfbce63a89 268 * @{
elmot 1:d0dfbce63a89 269 */
elmot 1:d0dfbce63a89 270
elmot 1:d0dfbce63a89 271 /**
elmot 1:d0dfbce63a89 272 * @brief Switch the regulator from main mode to low-power mode
elmot 1:d0dfbce63a89 273 * @rmtoll CR1 LPR LL_PWR_EnableLowPowerRunMode
elmot 1:d0dfbce63a89 274 * @retval None
elmot 1:d0dfbce63a89 275 */
elmot 1:d0dfbce63a89 276 __STATIC_INLINE void LL_PWR_EnableLowPowerRunMode(void)
elmot 1:d0dfbce63a89 277 {
elmot 1:d0dfbce63a89 278 SET_BIT(PWR->CR1, PWR_CR1_LPR);
elmot 1:d0dfbce63a89 279 }
elmot 1:d0dfbce63a89 280
elmot 1:d0dfbce63a89 281 /**
elmot 1:d0dfbce63a89 282 * @brief Switch the regulator from low-power mode to main mode
elmot 1:d0dfbce63a89 283 * @rmtoll CR1 LPR LL_PWR_DisableLowPowerRunMode
elmot 1:d0dfbce63a89 284 * @retval None
elmot 1:d0dfbce63a89 285 */
elmot 1:d0dfbce63a89 286 __STATIC_INLINE void LL_PWR_DisableLowPowerRunMode(void)
elmot 1:d0dfbce63a89 287 {
elmot 1:d0dfbce63a89 288 CLEAR_BIT(PWR->CR1, PWR_CR1_LPR);
elmot 1:d0dfbce63a89 289 }
elmot 1:d0dfbce63a89 290
elmot 1:d0dfbce63a89 291 /**
elmot 1:d0dfbce63a89 292 * @brief Check if the regulator is in low-power mode
elmot 1:d0dfbce63a89 293 * @rmtoll CR1 LPR LL_PWR_IsEnabledLowPowerRunMode
elmot 1:d0dfbce63a89 294 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 295 */
elmot 1:d0dfbce63a89 296 __STATIC_INLINE uint32_t LL_PWR_IsEnabledLowPowerRunMode(void)
elmot 1:d0dfbce63a89 297 {
elmot 1:d0dfbce63a89 298 return (READ_BIT(PWR->CR1, PWR_CR1_LPR) == (PWR_CR1_LPR));
elmot 1:d0dfbce63a89 299 }
elmot 1:d0dfbce63a89 300
elmot 1:d0dfbce63a89 301 /**
elmot 1:d0dfbce63a89 302 * @brief Switch from run main mode to run low-power mode.
elmot 1:d0dfbce63a89 303 * @rmtoll CR1 LPR LL_PWR_EnterLowPowerRunMode
elmot 1:d0dfbce63a89 304 * @retval None
elmot 1:d0dfbce63a89 305 */
elmot 1:d0dfbce63a89 306 __STATIC_INLINE void LL_PWR_EnterLowPowerRunMode(void)
elmot 1:d0dfbce63a89 307 {
elmot 1:d0dfbce63a89 308 LL_PWR_EnableLowPowerRunMode();
elmot 1:d0dfbce63a89 309 }
elmot 1:d0dfbce63a89 310
elmot 1:d0dfbce63a89 311 /**
elmot 1:d0dfbce63a89 312 * @brief Switch from run main mode to low-power mode.
elmot 1:d0dfbce63a89 313 * @rmtoll CR1 LPR LL_PWR_ExitLowPowerRunMode
elmot 1:d0dfbce63a89 314 * @retval None
elmot 1:d0dfbce63a89 315 */
elmot 1:d0dfbce63a89 316 __STATIC_INLINE void LL_PWR_ExitLowPowerRunMode(void)
elmot 1:d0dfbce63a89 317 {
elmot 1:d0dfbce63a89 318 LL_PWR_DisableLowPowerRunMode();
elmot 1:d0dfbce63a89 319 }
elmot 1:d0dfbce63a89 320
elmot 1:d0dfbce63a89 321 /**
elmot 1:d0dfbce63a89 322 * @brief Set the main internal regulator output voltage
elmot 1:d0dfbce63a89 323 * @rmtoll CR1 VOS LL_PWR_SetRegulVoltageScaling
elmot 1:d0dfbce63a89 324 * @param VoltageScaling This parameter can be one of the following values:
elmot 1:d0dfbce63a89 325 * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1
elmot 1:d0dfbce63a89 326 * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2
elmot 1:d0dfbce63a89 327 * @retval None
elmot 1:d0dfbce63a89 328 */
elmot 1:d0dfbce63a89 329 __STATIC_INLINE void LL_PWR_SetRegulVoltageScaling(uint32_t VoltageScaling)
elmot 1:d0dfbce63a89 330 {
elmot 1:d0dfbce63a89 331 MODIFY_REG(PWR->CR1, PWR_CR1_VOS, VoltageScaling);
elmot 1:d0dfbce63a89 332 }
elmot 1:d0dfbce63a89 333
elmot 1:d0dfbce63a89 334 /**
elmot 1:d0dfbce63a89 335 * @brief Get the main internal regulator output voltage
elmot 1:d0dfbce63a89 336 * @rmtoll CR1 VOS LL_PWR_GetRegulVoltageScaling
elmot 1:d0dfbce63a89 337 * @retval Returned value can be one of the following values:
elmot 1:d0dfbce63a89 338 * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE1
elmot 1:d0dfbce63a89 339 * @arg @ref LL_PWR_REGU_VOLTAGE_SCALE2
elmot 1:d0dfbce63a89 340 */
elmot 1:d0dfbce63a89 341 __STATIC_INLINE uint32_t LL_PWR_GetRegulVoltageScaling(void)
elmot 1:d0dfbce63a89 342 {
elmot 1:d0dfbce63a89 343 return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_VOS));
elmot 1:d0dfbce63a89 344 }
elmot 1:d0dfbce63a89 345
elmot 1:d0dfbce63a89 346 /**
elmot 1:d0dfbce63a89 347 * @brief Enable access to the backup domain
elmot 1:d0dfbce63a89 348 * @rmtoll CR1 DBP LL_PWR_EnableBkUpAccess
elmot 1:d0dfbce63a89 349 * @retval None
elmot 1:d0dfbce63a89 350 */
elmot 1:d0dfbce63a89 351 __STATIC_INLINE void LL_PWR_EnableBkUpAccess(void)
elmot 1:d0dfbce63a89 352 {
elmot 1:d0dfbce63a89 353 SET_BIT(PWR->CR1, PWR_CR1_DBP);
elmot 1:d0dfbce63a89 354 }
elmot 1:d0dfbce63a89 355
elmot 1:d0dfbce63a89 356 /**
elmot 1:d0dfbce63a89 357 * @brief Disable access to the backup domain
elmot 1:d0dfbce63a89 358 * @rmtoll CR1 DBP LL_PWR_DisableBkUpAccess
elmot 1:d0dfbce63a89 359 * @retval None
elmot 1:d0dfbce63a89 360 */
elmot 1:d0dfbce63a89 361 __STATIC_INLINE void LL_PWR_DisableBkUpAccess(void)
elmot 1:d0dfbce63a89 362 {
elmot 1:d0dfbce63a89 363 CLEAR_BIT(PWR->CR1, PWR_CR1_DBP);
elmot 1:d0dfbce63a89 364 }
elmot 1:d0dfbce63a89 365
elmot 1:d0dfbce63a89 366 /**
elmot 1:d0dfbce63a89 367 * @brief Check if the backup domain is enabled
elmot 1:d0dfbce63a89 368 * @rmtoll CR1 DBP LL_PWR_IsEnabledBkUpAccess
elmot 1:d0dfbce63a89 369 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 370 */
elmot 1:d0dfbce63a89 371 __STATIC_INLINE uint32_t LL_PWR_IsEnabledBkUpAccess(void)
elmot 1:d0dfbce63a89 372 {
elmot 1:d0dfbce63a89 373 return (READ_BIT(PWR->CR1, PWR_CR1_DBP) == (PWR_CR1_DBP));
elmot 1:d0dfbce63a89 374 }
elmot 1:d0dfbce63a89 375
elmot 1:d0dfbce63a89 376 /**
elmot 1:d0dfbce63a89 377 * @brief Set Low-Power mode
elmot 1:d0dfbce63a89 378 * @rmtoll CR1 LPMS LL_PWR_SetPowerMode
elmot 1:d0dfbce63a89 379 * @param LowPowerMode This parameter can be one of the following values:
elmot 1:d0dfbce63a89 380 * @arg @ref LL_PWR_MODE_STOP0
elmot 1:d0dfbce63a89 381 * @arg @ref LL_PWR_MODE_STOP1
elmot 1:d0dfbce63a89 382 * @arg @ref LL_PWR_MODE_STOP2
elmot 1:d0dfbce63a89 383 * @arg @ref LL_PWR_MODE_STANDBY
elmot 1:d0dfbce63a89 384 * @arg @ref LL_PWR_MODE_SHUTDOWN
elmot 1:d0dfbce63a89 385 * @retval None
elmot 1:d0dfbce63a89 386 */
elmot 1:d0dfbce63a89 387 __STATIC_INLINE void LL_PWR_SetPowerMode(uint32_t LowPowerMode)
elmot 1:d0dfbce63a89 388 {
elmot 1:d0dfbce63a89 389 MODIFY_REG(PWR->CR1, PWR_CR1_LPMS, LowPowerMode);
elmot 1:d0dfbce63a89 390 }
elmot 1:d0dfbce63a89 391
elmot 1:d0dfbce63a89 392 /**
elmot 1:d0dfbce63a89 393 * @brief Get Low-Power mode
elmot 1:d0dfbce63a89 394 * @rmtoll CR1 LPMS LL_PWR_GetPowerMode
elmot 1:d0dfbce63a89 395 * @retval Returned value can be one of the following values:
elmot 1:d0dfbce63a89 396 * @arg @ref LL_PWR_MODE_STOP0
elmot 1:d0dfbce63a89 397 * @arg @ref LL_PWR_MODE_STOP1
elmot 1:d0dfbce63a89 398 * @arg @ref LL_PWR_MODE_STOP2
elmot 1:d0dfbce63a89 399 * @arg @ref LL_PWR_MODE_STANDBY
elmot 1:d0dfbce63a89 400 * @arg @ref LL_PWR_MODE_SHUTDOWN
elmot 1:d0dfbce63a89 401 */
elmot 1:d0dfbce63a89 402 __STATIC_INLINE uint32_t LL_PWR_GetPowerMode(void)
elmot 1:d0dfbce63a89 403 {
elmot 1:d0dfbce63a89 404 return (uint32_t)(READ_BIT(PWR->CR1, PWR_CR1_LPMS));
elmot 1:d0dfbce63a89 405 }
elmot 1:d0dfbce63a89 406
elmot 1:d0dfbce63a89 407 #if defined(USB_OTG_FS)
elmot 1:d0dfbce63a89 408 /**
elmot 1:d0dfbce63a89 409 * @brief Enable VDDUSB supply
elmot 1:d0dfbce63a89 410 * @rmtoll CR2 USV LL_PWR_EnableVddUSB
elmot 1:d0dfbce63a89 411 * @retval None
elmot 1:d0dfbce63a89 412 */
elmot 1:d0dfbce63a89 413 __STATIC_INLINE void LL_PWR_EnableVddUSB(void)
elmot 1:d0dfbce63a89 414 {
elmot 1:d0dfbce63a89 415 SET_BIT(PWR->CR2, PWR_CR2_USV);
elmot 1:d0dfbce63a89 416 }
elmot 1:d0dfbce63a89 417 #endif /* USB_OTG_FS */
elmot 1:d0dfbce63a89 418
elmot 1:d0dfbce63a89 419 #if defined(USB_OTG_FS)
elmot 1:d0dfbce63a89 420 /**
elmot 1:d0dfbce63a89 421 * @brief Disable VDDUSB supply
elmot 1:d0dfbce63a89 422 * @rmtoll CR2 USV LL_PWR_DisableVddUSB
elmot 1:d0dfbce63a89 423 * @retval None
elmot 1:d0dfbce63a89 424 */
elmot 1:d0dfbce63a89 425 __STATIC_INLINE void LL_PWR_DisableVddUSB(void)
elmot 1:d0dfbce63a89 426 {
elmot 1:d0dfbce63a89 427 CLEAR_BIT(PWR->CR2, PWR_CR2_USV);
elmot 1:d0dfbce63a89 428 }
elmot 1:d0dfbce63a89 429 #endif /* USB_OTG_FS */
elmot 1:d0dfbce63a89 430
elmot 1:d0dfbce63a89 431 #if defined(USB_OTG_FS)
elmot 1:d0dfbce63a89 432 /**
elmot 1:d0dfbce63a89 433 * @brief Check if VDDUSB supply is enabled
elmot 1:d0dfbce63a89 434 * @rmtoll CR2 USV LL_PWR_IsEnabledVddUSB
elmot 1:d0dfbce63a89 435 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 436 */
elmot 1:d0dfbce63a89 437 __STATIC_INLINE uint32_t LL_PWR_IsEnabledVddUSB(void)
elmot 1:d0dfbce63a89 438 {
elmot 1:d0dfbce63a89 439 return (READ_BIT(PWR->CR2, PWR_CR2_USV) == (PWR_CR2_USV));
elmot 1:d0dfbce63a89 440 }
elmot 1:d0dfbce63a89 441 #endif /* USB_OTG_FS */
elmot 1:d0dfbce63a89 442
elmot 1:d0dfbce63a89 443 #if defined(PWR_CR2_IOSV)
elmot 1:d0dfbce63a89 444 /**
elmot 1:d0dfbce63a89 445 * @brief Enable VDDIO2 supply
elmot 1:d0dfbce63a89 446 * @rmtoll CR2 IOSV LL_PWR_EnableVddIO2
elmot 1:d0dfbce63a89 447 * @retval None
elmot 1:d0dfbce63a89 448 */
elmot 1:d0dfbce63a89 449 __STATIC_INLINE void LL_PWR_EnableVddIO2(void)
elmot 1:d0dfbce63a89 450 {
elmot 1:d0dfbce63a89 451 SET_BIT(PWR->CR2, PWR_CR2_IOSV);
elmot 1:d0dfbce63a89 452 }
elmot 1:d0dfbce63a89 453
elmot 1:d0dfbce63a89 454 /**
elmot 1:d0dfbce63a89 455 * @brief Disable VDDIO2 supply
elmot 1:d0dfbce63a89 456 * @rmtoll CR2 IOSV LL_PWR_DisableVddIO2
elmot 1:d0dfbce63a89 457 * @retval None
elmot 1:d0dfbce63a89 458 */
elmot 1:d0dfbce63a89 459 __STATIC_INLINE void LL_PWR_DisableVddIO2(void)
elmot 1:d0dfbce63a89 460 {
elmot 1:d0dfbce63a89 461 CLEAR_BIT(PWR->CR2, PWR_CR2_IOSV);
elmot 1:d0dfbce63a89 462 }
elmot 1:d0dfbce63a89 463
elmot 1:d0dfbce63a89 464 /**
elmot 1:d0dfbce63a89 465 * @brief Check if VDDIO2 supply is enabled
elmot 1:d0dfbce63a89 466 * @rmtoll CR2 IOSV LL_PWR_IsEnabledVddIO2
elmot 1:d0dfbce63a89 467 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 468 */
elmot 1:d0dfbce63a89 469 __STATIC_INLINE uint32_t LL_PWR_IsEnabledVddIO2(void)
elmot 1:d0dfbce63a89 470 {
elmot 1:d0dfbce63a89 471 return (READ_BIT(PWR->CR2, PWR_CR2_IOSV) == (PWR_CR2_IOSV));
elmot 1:d0dfbce63a89 472 }
elmot 1:d0dfbce63a89 473 #endif /* PWR_CR2_IOSV */
elmot 1:d0dfbce63a89 474
elmot 1:d0dfbce63a89 475 /**
elmot 1:d0dfbce63a89 476 * @brief Enable the Power Voltage Monitoring on a peripheral
elmot 1:d0dfbce63a89 477 * @rmtoll CR2 PVME1 LL_PWR_EnablePVM\n
elmot 1:d0dfbce63a89 478 * CR2 PVME2 LL_PWR_EnablePVM\n
elmot 1:d0dfbce63a89 479 * CR2 PVME3 LL_PWR_EnablePVM\n
elmot 1:d0dfbce63a89 480 * CR2 PVME4 LL_PWR_EnablePVM
elmot 1:d0dfbce63a89 481 * @param PeriphVoltage This parameter can be one of the following values:
elmot 1:d0dfbce63a89 482 * @arg @ref LL_PWR_PVM_VDDUSB_1_2V (*)
elmot 1:d0dfbce63a89 483 * @arg @ref LL_PWR_PVM_VDDIO2_0_9V (*)
elmot 1:d0dfbce63a89 484 * @arg @ref LL_PWR_PVM_VDDA_1_62V
elmot 1:d0dfbce63a89 485 * @arg @ref LL_PWR_PVM_VDDA_2_2V
elmot 1:d0dfbce63a89 486 *
elmot 1:d0dfbce63a89 487 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 488 * @retval None
elmot 1:d0dfbce63a89 489 */
elmot 1:d0dfbce63a89 490 __STATIC_INLINE void LL_PWR_EnablePVM(uint32_t PeriphVoltage)
elmot 1:d0dfbce63a89 491 {
elmot 1:d0dfbce63a89 492 SET_BIT(PWR->CR2, PeriphVoltage);
elmot 1:d0dfbce63a89 493 }
elmot 1:d0dfbce63a89 494
elmot 1:d0dfbce63a89 495 /**
elmot 1:d0dfbce63a89 496 * @brief Disable the Power Voltage Monitoring on a peripheral
elmot 1:d0dfbce63a89 497 * @rmtoll CR2 PVME1 LL_PWR_DisablePVM\n
elmot 1:d0dfbce63a89 498 * CR2 PVME2 LL_PWR_DisablePVM\n
elmot 1:d0dfbce63a89 499 * CR2 PVME3 LL_PWR_DisablePVM\n
elmot 1:d0dfbce63a89 500 * CR2 PVME4 LL_PWR_DisablePVM
elmot 1:d0dfbce63a89 501 * @param PeriphVoltage This parameter can be one of the following values:
elmot 1:d0dfbce63a89 502 * @arg @ref LL_PWR_PVM_VDDUSB_1_2V (*)
elmot 1:d0dfbce63a89 503 * @arg @ref LL_PWR_PVM_VDDIO2_0_9V (*)
elmot 1:d0dfbce63a89 504 * @arg @ref LL_PWR_PVM_VDDA_1_62V
elmot 1:d0dfbce63a89 505 * @arg @ref LL_PWR_PVM_VDDA_2_2V
elmot 1:d0dfbce63a89 506 *
elmot 1:d0dfbce63a89 507 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 508 * @retval None
elmot 1:d0dfbce63a89 509 */
elmot 1:d0dfbce63a89 510 __STATIC_INLINE void LL_PWR_DisablePVM(uint32_t PeriphVoltage)
elmot 1:d0dfbce63a89 511 {
elmot 1:d0dfbce63a89 512 CLEAR_BIT(PWR->CR2, PeriphVoltage);
elmot 1:d0dfbce63a89 513 }
elmot 1:d0dfbce63a89 514
elmot 1:d0dfbce63a89 515 /**
elmot 1:d0dfbce63a89 516 * @brief Check if Power Voltage Monitoring is enabled on a peripheral
elmot 1:d0dfbce63a89 517 * @rmtoll CR2 PVME1 LL_PWR_IsEnabledPVM\n
elmot 1:d0dfbce63a89 518 * CR2 PVME2 LL_PWR_IsEnabledPVM\n
elmot 1:d0dfbce63a89 519 * CR2 PVME3 LL_PWR_IsEnabledPVM\n
elmot 1:d0dfbce63a89 520 * CR2 PVME4 LL_PWR_IsEnabledPVM
elmot 1:d0dfbce63a89 521 * @param PeriphVoltage This parameter can be one of the following values:
elmot 1:d0dfbce63a89 522 * @arg @ref LL_PWR_PVM_VDDUSB_1_2V (*)
elmot 1:d0dfbce63a89 523 * @arg @ref LL_PWR_PVM_VDDIO2_0_9V (*)
elmot 1:d0dfbce63a89 524 * @arg @ref LL_PWR_PVM_VDDA_1_62V
elmot 1:d0dfbce63a89 525 * @arg @ref LL_PWR_PVM_VDDA_2_2V
elmot 1:d0dfbce63a89 526 *
elmot 1:d0dfbce63a89 527 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 528 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 529 */
elmot 1:d0dfbce63a89 530 __STATIC_INLINE uint32_t LL_PWR_IsEnabledPVM(uint32_t PeriphVoltage)
elmot 1:d0dfbce63a89 531 {
elmot 1:d0dfbce63a89 532 return (READ_BIT(PWR->CR2, PeriphVoltage) == (PeriphVoltage));
elmot 1:d0dfbce63a89 533 }
elmot 1:d0dfbce63a89 534
elmot 1:d0dfbce63a89 535 /**
elmot 1:d0dfbce63a89 536 * @brief Configure the voltage threshold detected by the Power Voltage Detector
elmot 1:d0dfbce63a89 537 * @rmtoll CR2 PLS LL_PWR_SetPVDLevel
elmot 1:d0dfbce63a89 538 * @param PVDLevel This parameter can be one of the following values:
elmot 1:d0dfbce63a89 539 * @arg @ref LL_PWR_PVDLEVEL_0
elmot 1:d0dfbce63a89 540 * @arg @ref LL_PWR_PVDLEVEL_1
elmot 1:d0dfbce63a89 541 * @arg @ref LL_PWR_PVDLEVEL_2
elmot 1:d0dfbce63a89 542 * @arg @ref LL_PWR_PVDLEVEL_3
elmot 1:d0dfbce63a89 543 * @arg @ref LL_PWR_PVDLEVEL_4
elmot 1:d0dfbce63a89 544 * @arg @ref LL_PWR_PVDLEVEL_5
elmot 1:d0dfbce63a89 545 * @arg @ref LL_PWR_PVDLEVEL_6
elmot 1:d0dfbce63a89 546 * @arg @ref LL_PWR_PVDLEVEL_7
elmot 1:d0dfbce63a89 547 * @retval None
elmot 1:d0dfbce63a89 548 */
elmot 1:d0dfbce63a89 549 __STATIC_INLINE void LL_PWR_SetPVDLevel(uint32_t PVDLevel)
elmot 1:d0dfbce63a89 550 {
elmot 1:d0dfbce63a89 551 MODIFY_REG(PWR->CR2, PWR_CR2_PLS, PVDLevel);
elmot 1:d0dfbce63a89 552 }
elmot 1:d0dfbce63a89 553
elmot 1:d0dfbce63a89 554 /**
elmot 1:d0dfbce63a89 555 * @brief Get the voltage threshold detection
elmot 1:d0dfbce63a89 556 * @rmtoll CR2 PLS LL_PWR_GetPVDLevel
elmot 1:d0dfbce63a89 557 * @retval Returned value can be one of the following values:
elmot 1:d0dfbce63a89 558 * @arg @ref LL_PWR_PVDLEVEL_0
elmot 1:d0dfbce63a89 559 * @arg @ref LL_PWR_PVDLEVEL_1
elmot 1:d0dfbce63a89 560 * @arg @ref LL_PWR_PVDLEVEL_2
elmot 1:d0dfbce63a89 561 * @arg @ref LL_PWR_PVDLEVEL_3
elmot 1:d0dfbce63a89 562 * @arg @ref LL_PWR_PVDLEVEL_4
elmot 1:d0dfbce63a89 563 * @arg @ref LL_PWR_PVDLEVEL_5
elmot 1:d0dfbce63a89 564 * @arg @ref LL_PWR_PVDLEVEL_6
elmot 1:d0dfbce63a89 565 * @arg @ref LL_PWR_PVDLEVEL_7
elmot 1:d0dfbce63a89 566 */
elmot 1:d0dfbce63a89 567 __STATIC_INLINE uint32_t LL_PWR_GetPVDLevel(void)
elmot 1:d0dfbce63a89 568 {
elmot 1:d0dfbce63a89 569 return (uint32_t)(READ_BIT(PWR->CR2, PWR_CR2_PLS));
elmot 1:d0dfbce63a89 570 }
elmot 1:d0dfbce63a89 571
elmot 1:d0dfbce63a89 572 /**
elmot 1:d0dfbce63a89 573 * @brief Enable Power Voltage Detector
elmot 1:d0dfbce63a89 574 * @rmtoll CR2 PVDE LL_PWR_EnablePVD
elmot 1:d0dfbce63a89 575 * @retval None
elmot 1:d0dfbce63a89 576 */
elmot 1:d0dfbce63a89 577 __STATIC_INLINE void LL_PWR_EnablePVD(void)
elmot 1:d0dfbce63a89 578 {
elmot 1:d0dfbce63a89 579 SET_BIT(PWR->CR2, PWR_CR2_PVDE);
elmot 1:d0dfbce63a89 580 }
elmot 1:d0dfbce63a89 581
elmot 1:d0dfbce63a89 582 /**
elmot 1:d0dfbce63a89 583 * @brief Disable Power Voltage Detector
elmot 1:d0dfbce63a89 584 * @rmtoll CR2 PVDE LL_PWR_DisablePVD
elmot 1:d0dfbce63a89 585 * @retval None
elmot 1:d0dfbce63a89 586 */
elmot 1:d0dfbce63a89 587 __STATIC_INLINE void LL_PWR_DisablePVD(void)
elmot 1:d0dfbce63a89 588 {
elmot 1:d0dfbce63a89 589 CLEAR_BIT(PWR->CR2, PWR_CR2_PVDE);
elmot 1:d0dfbce63a89 590 }
elmot 1:d0dfbce63a89 591
elmot 1:d0dfbce63a89 592 /**
elmot 1:d0dfbce63a89 593 * @brief Check if Power Voltage Detector is enabled
elmot 1:d0dfbce63a89 594 * @rmtoll CR2 PVDE LL_PWR_IsEnabledPVD
elmot 1:d0dfbce63a89 595 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 596 */
elmot 1:d0dfbce63a89 597 __STATIC_INLINE uint32_t LL_PWR_IsEnabledPVD(void)
elmot 1:d0dfbce63a89 598 {
elmot 1:d0dfbce63a89 599 return (READ_BIT(PWR->CR2, PWR_CR2_PVDE) == (PWR_CR2_PVDE));
elmot 1:d0dfbce63a89 600 }
elmot 1:d0dfbce63a89 601
elmot 1:d0dfbce63a89 602 /**
elmot 1:d0dfbce63a89 603 * @brief Enable Internal Wake-up line
elmot 1:d0dfbce63a89 604 * @rmtoll CR3 EIWF LL_PWR_EnableInternWU
elmot 1:d0dfbce63a89 605 * @retval None
elmot 1:d0dfbce63a89 606 */
elmot 1:d0dfbce63a89 607 __STATIC_INLINE void LL_PWR_EnableInternWU(void)
elmot 1:d0dfbce63a89 608 {
elmot 1:d0dfbce63a89 609 SET_BIT(PWR->CR3, PWR_CR3_EIWF);
elmot 1:d0dfbce63a89 610 }
elmot 1:d0dfbce63a89 611
elmot 1:d0dfbce63a89 612 /**
elmot 1:d0dfbce63a89 613 * @brief Disable Internal Wake-up line
elmot 1:d0dfbce63a89 614 * @rmtoll CR3 EIWF LL_PWR_DisableInternWU
elmot 1:d0dfbce63a89 615 * @retval None
elmot 1:d0dfbce63a89 616 */
elmot 1:d0dfbce63a89 617 __STATIC_INLINE void LL_PWR_DisableInternWU(void)
elmot 1:d0dfbce63a89 618 {
elmot 1:d0dfbce63a89 619 CLEAR_BIT(PWR->CR3, PWR_CR3_EIWF);
elmot 1:d0dfbce63a89 620 }
elmot 1:d0dfbce63a89 621
elmot 1:d0dfbce63a89 622 /**
elmot 1:d0dfbce63a89 623 * @brief Check if Internal Wake-up line is enabled
elmot 1:d0dfbce63a89 624 * @rmtoll CR3 EIWF LL_PWR_IsEnabledInternWU
elmot 1:d0dfbce63a89 625 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 626 */
elmot 1:d0dfbce63a89 627 __STATIC_INLINE uint32_t LL_PWR_IsEnabledInternWU(void)
elmot 1:d0dfbce63a89 628 {
elmot 1:d0dfbce63a89 629 return (READ_BIT(PWR->CR3, PWR_CR3_EIWF) == (PWR_CR3_EIWF));
elmot 1:d0dfbce63a89 630 }
elmot 1:d0dfbce63a89 631
elmot 1:d0dfbce63a89 632 /**
elmot 1:d0dfbce63a89 633 * @brief Enable pull-up and pull-down configuration
elmot 1:d0dfbce63a89 634 * @rmtoll CR3 APC LL_PWR_EnablePUPDCfg
elmot 1:d0dfbce63a89 635 * @retval None
elmot 1:d0dfbce63a89 636 */
elmot 1:d0dfbce63a89 637 __STATIC_INLINE void LL_PWR_EnablePUPDCfg(void)
elmot 1:d0dfbce63a89 638 {
elmot 1:d0dfbce63a89 639 SET_BIT(PWR->CR3, PWR_CR3_APC);
elmot 1:d0dfbce63a89 640 }
elmot 1:d0dfbce63a89 641
elmot 1:d0dfbce63a89 642 /**
elmot 1:d0dfbce63a89 643 * @brief Disable pull-up and pull-down configuration
elmot 1:d0dfbce63a89 644 * @rmtoll CR3 APC LL_PWR_DisablePUPDCfg
elmot 1:d0dfbce63a89 645 * @retval None
elmot 1:d0dfbce63a89 646 */
elmot 1:d0dfbce63a89 647 __STATIC_INLINE void LL_PWR_DisablePUPDCfg(void)
elmot 1:d0dfbce63a89 648 {
elmot 1:d0dfbce63a89 649 CLEAR_BIT(PWR->CR3, PWR_CR3_APC);
elmot 1:d0dfbce63a89 650 }
elmot 1:d0dfbce63a89 651
elmot 1:d0dfbce63a89 652 /**
elmot 1:d0dfbce63a89 653 * @brief Check if pull-up and pull-down configuration is enabled
elmot 1:d0dfbce63a89 654 * @rmtoll CR3 APC LL_PWR_IsEnabledPUPDCfg
elmot 1:d0dfbce63a89 655 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 656 */
elmot 1:d0dfbce63a89 657 __STATIC_INLINE uint32_t LL_PWR_IsEnabledPUPDCfg(void)
elmot 1:d0dfbce63a89 658 {
elmot 1:d0dfbce63a89 659 return (READ_BIT(PWR->CR3, PWR_CR3_APC) == (PWR_CR3_APC));
elmot 1:d0dfbce63a89 660 }
elmot 1:d0dfbce63a89 661
elmot 1:d0dfbce63a89 662 /**
elmot 1:d0dfbce63a89 663 * @brief Enable SRAM2 content retention in Standby mode
elmot 1:d0dfbce63a89 664 * @rmtoll CR3 RRS LL_PWR_EnableSRAM2Retention
elmot 1:d0dfbce63a89 665 * @retval None
elmot 1:d0dfbce63a89 666 */
elmot 1:d0dfbce63a89 667 __STATIC_INLINE void LL_PWR_EnableSRAM2Retention(void)
elmot 1:d0dfbce63a89 668 {
elmot 1:d0dfbce63a89 669 SET_BIT(PWR->CR3, PWR_CR3_RRS);
elmot 1:d0dfbce63a89 670 }
elmot 1:d0dfbce63a89 671
elmot 1:d0dfbce63a89 672 /**
elmot 1:d0dfbce63a89 673 * @brief Disable SRAM2 content retention in Standby mode
elmot 1:d0dfbce63a89 674 * @rmtoll CR3 RRS LL_PWR_DisableSRAM2Retention
elmot 1:d0dfbce63a89 675 * @retval None
elmot 1:d0dfbce63a89 676 */
elmot 1:d0dfbce63a89 677 __STATIC_INLINE void LL_PWR_DisableSRAM2Retention(void)
elmot 1:d0dfbce63a89 678 {
elmot 1:d0dfbce63a89 679 CLEAR_BIT(PWR->CR3, PWR_CR3_RRS);
elmot 1:d0dfbce63a89 680 }
elmot 1:d0dfbce63a89 681
elmot 1:d0dfbce63a89 682 /**
elmot 1:d0dfbce63a89 683 * @brief Check if SRAM2 content retention in Standby mode is enabled
elmot 1:d0dfbce63a89 684 * @rmtoll CR3 RRS LL_PWR_IsEnabledSRAM2Retention
elmot 1:d0dfbce63a89 685 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 686 */
elmot 1:d0dfbce63a89 687 __STATIC_INLINE uint32_t LL_PWR_IsEnabledSRAM2Retention(void)
elmot 1:d0dfbce63a89 688 {
elmot 1:d0dfbce63a89 689 return (READ_BIT(PWR->CR3, PWR_CR3_RRS) == (PWR_CR3_RRS));
elmot 1:d0dfbce63a89 690 }
elmot 1:d0dfbce63a89 691
elmot 1:d0dfbce63a89 692 /**
elmot 1:d0dfbce63a89 693 * @brief Enable the WakeUp PINx functionality
elmot 1:d0dfbce63a89 694 * @rmtoll CR3 EWUP1 LL_PWR_EnableWakeUpPin\n
elmot 1:d0dfbce63a89 695 * CR3 EWUP2 LL_PWR_EnableWakeUpPin\n
elmot 1:d0dfbce63a89 696 * CR3 EWUP3 LL_PWR_EnableWakeUpPin\n
elmot 1:d0dfbce63a89 697 * CR3 EWUP4 LL_PWR_EnableWakeUpPin\n
elmot 1:d0dfbce63a89 698 * CR3 EWUP5 LL_PWR_EnableWakeUpPin
elmot 1:d0dfbce63a89 699 * @param WakeUpPin This parameter can be one of the following values:
elmot 1:d0dfbce63a89 700 * @arg @ref LL_PWR_WAKEUP_PIN1
elmot 1:d0dfbce63a89 701 * @arg @ref LL_PWR_WAKEUP_PIN2
elmot 1:d0dfbce63a89 702 * @arg @ref LL_PWR_WAKEUP_PIN3
elmot 1:d0dfbce63a89 703 * @arg @ref LL_PWR_WAKEUP_PIN4
elmot 1:d0dfbce63a89 704 * @arg @ref LL_PWR_WAKEUP_PIN5
elmot 1:d0dfbce63a89 705 * @retval None
elmot 1:d0dfbce63a89 706 */
elmot 1:d0dfbce63a89 707 __STATIC_INLINE void LL_PWR_EnableWakeUpPin(uint32_t WakeUpPin)
elmot 1:d0dfbce63a89 708 {
elmot 1:d0dfbce63a89 709 SET_BIT(PWR->CR3, WakeUpPin);
elmot 1:d0dfbce63a89 710 }
elmot 1:d0dfbce63a89 711
elmot 1:d0dfbce63a89 712 /**
elmot 1:d0dfbce63a89 713 * @brief Disable the WakeUp PINx functionality
elmot 1:d0dfbce63a89 714 * @rmtoll CR3 EWUP1 LL_PWR_DisableWakeUpPin\n
elmot 1:d0dfbce63a89 715 * CR3 EWUP2 LL_PWR_DisableWakeUpPin\n
elmot 1:d0dfbce63a89 716 * CR3 EWUP3 LL_PWR_DisableWakeUpPin\n
elmot 1:d0dfbce63a89 717 * CR3 EWUP4 LL_PWR_DisableWakeUpPin\n
elmot 1:d0dfbce63a89 718 * CR3 EWUP5 LL_PWR_DisableWakeUpPin
elmot 1:d0dfbce63a89 719 * @param WakeUpPin This parameter can be one of the following values:
elmot 1:d0dfbce63a89 720 * @arg @ref LL_PWR_WAKEUP_PIN1
elmot 1:d0dfbce63a89 721 * @arg @ref LL_PWR_WAKEUP_PIN2
elmot 1:d0dfbce63a89 722 * @arg @ref LL_PWR_WAKEUP_PIN3
elmot 1:d0dfbce63a89 723 * @arg @ref LL_PWR_WAKEUP_PIN4
elmot 1:d0dfbce63a89 724 * @arg @ref LL_PWR_WAKEUP_PIN5
elmot 1:d0dfbce63a89 725 * @retval None
elmot 1:d0dfbce63a89 726 */
elmot 1:d0dfbce63a89 727 __STATIC_INLINE void LL_PWR_DisableWakeUpPin(uint32_t WakeUpPin)
elmot 1:d0dfbce63a89 728 {
elmot 1:d0dfbce63a89 729 CLEAR_BIT(PWR->CR3, WakeUpPin);
elmot 1:d0dfbce63a89 730 }
elmot 1:d0dfbce63a89 731
elmot 1:d0dfbce63a89 732 /**
elmot 1:d0dfbce63a89 733 * @brief Check if the WakeUp PINx functionality is enabled
elmot 1:d0dfbce63a89 734 * @rmtoll CR3 EWUP1 LL_PWR_IsEnabledWakeUpPin\n
elmot 1:d0dfbce63a89 735 * CR3 EWUP2 LL_PWR_IsEnabledWakeUpPin\n
elmot 1:d0dfbce63a89 736 * CR3 EWUP3 LL_PWR_IsEnabledWakeUpPin\n
elmot 1:d0dfbce63a89 737 * CR3 EWUP4 LL_PWR_IsEnabledWakeUpPin\n
elmot 1:d0dfbce63a89 738 * CR3 EWUP5 LL_PWR_IsEnabledWakeUpPin
elmot 1:d0dfbce63a89 739 * @param WakeUpPin This parameter can be one of the following values:
elmot 1:d0dfbce63a89 740 * @arg @ref LL_PWR_WAKEUP_PIN1
elmot 1:d0dfbce63a89 741 * @arg @ref LL_PWR_WAKEUP_PIN2
elmot 1:d0dfbce63a89 742 * @arg @ref LL_PWR_WAKEUP_PIN3
elmot 1:d0dfbce63a89 743 * @arg @ref LL_PWR_WAKEUP_PIN4
elmot 1:d0dfbce63a89 744 * @arg @ref LL_PWR_WAKEUP_PIN5
elmot 1:d0dfbce63a89 745 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 746 */
elmot 1:d0dfbce63a89 747 __STATIC_INLINE uint32_t LL_PWR_IsEnabledWakeUpPin(uint32_t WakeUpPin)
elmot 1:d0dfbce63a89 748 {
elmot 1:d0dfbce63a89 749 return (READ_BIT(PWR->CR3, WakeUpPin) == (WakeUpPin));
elmot 1:d0dfbce63a89 750 }
elmot 1:d0dfbce63a89 751
elmot 1:d0dfbce63a89 752 /**
elmot 1:d0dfbce63a89 753 * @brief Set the resistor impedance
elmot 1:d0dfbce63a89 754 * @rmtoll CR4 VBRS LL_PWR_SetBattChargResistor
elmot 1:d0dfbce63a89 755 * @param Resistor This parameter can be one of the following values:
elmot 1:d0dfbce63a89 756 * @arg @ref LL_PWR_BATT_CHARG_RESISTOR_5K
elmot 1:d0dfbce63a89 757 * @arg @ref LL_PWR_BATT_CHARGRESISTOR_1_5K
elmot 1:d0dfbce63a89 758 * @retval None
elmot 1:d0dfbce63a89 759 */
elmot 1:d0dfbce63a89 760 __STATIC_INLINE void LL_PWR_SetBattChargResistor(uint32_t Resistor)
elmot 1:d0dfbce63a89 761 {
elmot 1:d0dfbce63a89 762 MODIFY_REG(PWR->CR4, PWR_CR4_VBRS, Resistor);
elmot 1:d0dfbce63a89 763 }
elmot 1:d0dfbce63a89 764
elmot 1:d0dfbce63a89 765 /**
elmot 1:d0dfbce63a89 766 * @brief Get the resistor impedance
elmot 1:d0dfbce63a89 767 * @rmtoll CR4 VBRS LL_PWR_GetBattChargResistor
elmot 1:d0dfbce63a89 768 * @retval Returned value can be one of the following values:
elmot 1:d0dfbce63a89 769 * @arg @ref LL_PWR_BATT_CHARG_RESISTOR_5K
elmot 1:d0dfbce63a89 770 * @arg @ref LL_PWR_BATT_CHARGRESISTOR_1_5K
elmot 1:d0dfbce63a89 771 */
elmot 1:d0dfbce63a89 772 __STATIC_INLINE uint32_t LL_PWR_GetBattChargResistor(void)
elmot 1:d0dfbce63a89 773 {
elmot 1:d0dfbce63a89 774 return (uint32_t)(READ_BIT(PWR->CR4, PWR_CR4_VBRS));
elmot 1:d0dfbce63a89 775 }
elmot 1:d0dfbce63a89 776
elmot 1:d0dfbce63a89 777 /**
elmot 1:d0dfbce63a89 778 * @brief Enable battery charging
elmot 1:d0dfbce63a89 779 * @rmtoll CR4 VBE LL_PWR_EnableBatteryCharging
elmot 1:d0dfbce63a89 780 * @retval None
elmot 1:d0dfbce63a89 781 */
elmot 1:d0dfbce63a89 782 __STATIC_INLINE void LL_PWR_EnableBatteryCharging(void)
elmot 1:d0dfbce63a89 783 {
elmot 1:d0dfbce63a89 784 SET_BIT(PWR->CR4, PWR_CR4_VBE);
elmot 1:d0dfbce63a89 785 }
elmot 1:d0dfbce63a89 786
elmot 1:d0dfbce63a89 787 /**
elmot 1:d0dfbce63a89 788 * @brief Disable battery charging
elmot 1:d0dfbce63a89 789 * @rmtoll CR4 VBE LL_PWR_DisableBatteryCharging
elmot 1:d0dfbce63a89 790 * @retval None
elmot 1:d0dfbce63a89 791 */
elmot 1:d0dfbce63a89 792 __STATIC_INLINE void LL_PWR_DisableBatteryCharging(void)
elmot 1:d0dfbce63a89 793 {
elmot 1:d0dfbce63a89 794 CLEAR_BIT(PWR->CR4, PWR_CR4_VBE);
elmot 1:d0dfbce63a89 795 }
elmot 1:d0dfbce63a89 796
elmot 1:d0dfbce63a89 797 /**
elmot 1:d0dfbce63a89 798 * @brief Check if battery charging is enabled
elmot 1:d0dfbce63a89 799 * @rmtoll CR4 VBE LL_PWR_IsEnabledBatteryCharging
elmot 1:d0dfbce63a89 800 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 801 */
elmot 1:d0dfbce63a89 802 __STATIC_INLINE uint32_t LL_PWR_IsEnabledBatteryCharging(void)
elmot 1:d0dfbce63a89 803 {
elmot 1:d0dfbce63a89 804 return (READ_BIT(PWR->CR4, PWR_CR4_VBE) == (PWR_CR4_VBE));
elmot 1:d0dfbce63a89 805 }
elmot 1:d0dfbce63a89 806
elmot 1:d0dfbce63a89 807 /**
elmot 1:d0dfbce63a89 808 * @brief Set the Wake-Up pin polarity low for the event detection
elmot 1:d0dfbce63a89 809 * @rmtoll CR4 WP1 LL_PWR_SetWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 810 * CR4 WP2 LL_PWR_SetWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 811 * CR4 WP3 LL_PWR_SetWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 812 * CR4 WP4 LL_PWR_SetWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 813 * CR4 WP5 LL_PWR_SetWakeUpPinPolarityLow
elmot 1:d0dfbce63a89 814 * @param WakeUpPin This parameter can be one of the following values:
elmot 1:d0dfbce63a89 815 * @arg @ref LL_PWR_WAKEUP_PIN1
elmot 1:d0dfbce63a89 816 * @arg @ref LL_PWR_WAKEUP_PIN2
elmot 1:d0dfbce63a89 817 * @arg @ref LL_PWR_WAKEUP_PIN3
elmot 1:d0dfbce63a89 818 * @arg @ref LL_PWR_WAKEUP_PIN4
elmot 1:d0dfbce63a89 819 * @arg @ref LL_PWR_WAKEUP_PIN5
elmot 1:d0dfbce63a89 820 * @retval None
elmot 1:d0dfbce63a89 821 */
elmot 1:d0dfbce63a89 822 __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityLow(uint32_t WakeUpPin)
elmot 1:d0dfbce63a89 823 {
elmot 1:d0dfbce63a89 824 SET_BIT(PWR->CR4, WakeUpPin);
elmot 1:d0dfbce63a89 825 }
elmot 1:d0dfbce63a89 826
elmot 1:d0dfbce63a89 827 /**
elmot 1:d0dfbce63a89 828 * @brief Set the Wake-Up pin polarity high for the event detection
elmot 1:d0dfbce63a89 829 * @rmtoll CR4 WP1 LL_PWR_SetWakeUpPinPolarityHigh\n
elmot 1:d0dfbce63a89 830 * CR4 WP2 LL_PWR_SetWakeUpPinPolarityHigh\n
elmot 1:d0dfbce63a89 831 * CR4 WP3 LL_PWR_SetWakeUpPinPolarityHigh\n
elmot 1:d0dfbce63a89 832 * CR4 WP4 LL_PWR_SetWakeUpPinPolarityHigh\n
elmot 1:d0dfbce63a89 833 * CR4 WP5 LL_PWR_SetWakeUpPinPolarityHigh
elmot 1:d0dfbce63a89 834 * @param WakeUpPin This parameter can be one of the following values:
elmot 1:d0dfbce63a89 835 * @arg @ref LL_PWR_WAKEUP_PIN1
elmot 1:d0dfbce63a89 836 * @arg @ref LL_PWR_WAKEUP_PIN2
elmot 1:d0dfbce63a89 837 * @arg @ref LL_PWR_WAKEUP_PIN3
elmot 1:d0dfbce63a89 838 * @arg @ref LL_PWR_WAKEUP_PIN4
elmot 1:d0dfbce63a89 839 * @arg @ref LL_PWR_WAKEUP_PIN5
elmot 1:d0dfbce63a89 840 * @retval None
elmot 1:d0dfbce63a89 841 */
elmot 1:d0dfbce63a89 842 __STATIC_INLINE void LL_PWR_SetWakeUpPinPolarityHigh(uint32_t WakeUpPin)
elmot 1:d0dfbce63a89 843 {
elmot 1:d0dfbce63a89 844 CLEAR_BIT(PWR->CR4, WakeUpPin);
elmot 1:d0dfbce63a89 845 }
elmot 1:d0dfbce63a89 846
elmot 1:d0dfbce63a89 847 /**
elmot 1:d0dfbce63a89 848 * @brief Get the Wake-Up pin polarity for the event detection
elmot 1:d0dfbce63a89 849 * @rmtoll CR4 WP1 LL_PWR_IsWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 850 * CR4 WP2 LL_PWR_IsWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 851 * CR4 WP3 LL_PWR_IsWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 852 * CR4 WP4 LL_PWR_IsWakeUpPinPolarityLow\n
elmot 1:d0dfbce63a89 853 * CR4 WP5 LL_PWR_IsWakeUpPinPolarityLow
elmot 1:d0dfbce63a89 854 * @param WakeUpPin This parameter can be one of the following values:
elmot 1:d0dfbce63a89 855 * @arg @ref LL_PWR_WAKEUP_PIN1
elmot 1:d0dfbce63a89 856 * @arg @ref LL_PWR_WAKEUP_PIN2
elmot 1:d0dfbce63a89 857 * @arg @ref LL_PWR_WAKEUP_PIN3
elmot 1:d0dfbce63a89 858 * @arg @ref LL_PWR_WAKEUP_PIN4
elmot 1:d0dfbce63a89 859 * @arg @ref LL_PWR_WAKEUP_PIN5
elmot 1:d0dfbce63a89 860 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 861 */
elmot 1:d0dfbce63a89 862 __STATIC_INLINE uint32_t LL_PWR_IsWakeUpPinPolarityLow(uint32_t WakeUpPin)
elmot 1:d0dfbce63a89 863 {
elmot 1:d0dfbce63a89 864 return (READ_BIT(PWR->CR4, WakeUpPin) == (WakeUpPin));
elmot 1:d0dfbce63a89 865 }
elmot 1:d0dfbce63a89 866
elmot 1:d0dfbce63a89 867 /**
elmot 1:d0dfbce63a89 868 * @brief Enable GPIO pull-up state in Standby and Shutdown modes
elmot 1:d0dfbce63a89 869 * @rmtoll PUCRA PU0-15 LL_PWR_EnableGPIOPullUp\n
elmot 1:d0dfbce63a89 870 * PUCRB PU0-15 LL_PWR_EnableGPIOPullUp\n
elmot 1:d0dfbce63a89 871 * PUCRC PU0-15 LL_PWR_EnableGPIOPullUp\n
elmot 1:d0dfbce63a89 872 * PUCRD PU0-15 LL_PWR_EnableGPIOPullUp\n
elmot 1:d0dfbce63a89 873 * PUCRE PU0-15 LL_PWR_EnableGPIOPullUp\n
elmot 1:d0dfbce63a89 874 * PUCRF PU0-15 LL_PWR_EnableGPIOPullUp\n
elmot 1:d0dfbce63a89 875 * PUCRG PU0-15 LL_PWR_EnableGPIOPullUp\n
elmot 1:d0dfbce63a89 876 * PUCRH PU0-1 LL_PWR_EnableGPIOPullUp
elmot 1:d0dfbce63a89 877 * @param GPIO This parameter can be one of the following values:
elmot 1:d0dfbce63a89 878 * @arg @ref LL_PWR_GPIO_A
elmot 1:d0dfbce63a89 879 * @arg @ref LL_PWR_GPIO_B
elmot 1:d0dfbce63a89 880 * @arg @ref LL_PWR_GPIO_C
elmot 1:d0dfbce63a89 881 * @arg @ref LL_PWR_GPIO_D
elmot 1:d0dfbce63a89 882 * @arg @ref LL_PWR_GPIO_E
elmot 1:d0dfbce63a89 883 * @arg @ref LL_PWR_GPIO_F (*)
elmot 1:d0dfbce63a89 884 * @arg @ref LL_PWR_GPIO_G (*)
elmot 1:d0dfbce63a89 885 * @arg @ref LL_PWR_GPIO_H
elmot 1:d0dfbce63a89 886 *
elmot 1:d0dfbce63a89 887 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 888 * @param GPIONumber This parameter can be one of the following values:
elmot 1:d0dfbce63a89 889 * @arg @ref LL_PWR_GPIO_BIT_0
elmot 1:d0dfbce63a89 890 * @arg @ref LL_PWR_GPIO_BIT_1
elmot 1:d0dfbce63a89 891 * @arg @ref LL_PWR_GPIO_BIT_2
elmot 1:d0dfbce63a89 892 * @arg @ref LL_PWR_GPIO_BIT_3
elmot 1:d0dfbce63a89 893 * @arg @ref LL_PWR_GPIO_BIT_4
elmot 1:d0dfbce63a89 894 * @arg @ref LL_PWR_GPIO_BIT_5
elmot 1:d0dfbce63a89 895 * @arg @ref LL_PWR_GPIO_BIT_6
elmot 1:d0dfbce63a89 896 * @arg @ref LL_PWR_GPIO_BIT_7
elmot 1:d0dfbce63a89 897 * @arg @ref LL_PWR_GPIO_BIT_8
elmot 1:d0dfbce63a89 898 * @arg @ref LL_PWR_GPIO_BIT_9
elmot 1:d0dfbce63a89 899 * @arg @ref LL_PWR_GPIO_BIT_10
elmot 1:d0dfbce63a89 900 * @arg @ref LL_PWR_GPIO_BIT_11
elmot 1:d0dfbce63a89 901 * @arg @ref LL_PWR_GPIO_BIT_12
elmot 1:d0dfbce63a89 902 * @arg @ref LL_PWR_GPIO_BIT_13
elmot 1:d0dfbce63a89 903 * @arg @ref LL_PWR_GPIO_BIT_14
elmot 1:d0dfbce63a89 904 * @arg @ref LL_PWR_GPIO_BIT_15
elmot 1:d0dfbce63a89 905 * @retval None
elmot 1:d0dfbce63a89 906 */
elmot 1:d0dfbce63a89 907 __STATIC_INLINE void LL_PWR_EnableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber)
elmot 1:d0dfbce63a89 908 {
elmot 1:d0dfbce63a89 909 SET_BIT(*((uint32_t *)GPIO), GPIONumber);
elmot 1:d0dfbce63a89 910 }
elmot 1:d0dfbce63a89 911
elmot 1:d0dfbce63a89 912 /**
elmot 1:d0dfbce63a89 913 * @brief Disable GPIO pull-up state in Standby and Shutdown modes
elmot 1:d0dfbce63a89 914 * @rmtoll PUCRA PU0-15 LL_PWR_DisableGPIOPullUp\n
elmot 1:d0dfbce63a89 915 * PUCRB PU0-15 LL_PWR_DisableGPIOPullUp\n
elmot 1:d0dfbce63a89 916 * PUCRC PU0-15 LL_PWR_DisableGPIOPullUp\n
elmot 1:d0dfbce63a89 917 * PUCRD PU0-15 LL_PWR_DisableGPIOPullUp\n
elmot 1:d0dfbce63a89 918 * PUCRE PU0-15 LL_PWR_DisableGPIOPullUp\n
elmot 1:d0dfbce63a89 919 * PUCRF PU0-15 LL_PWR_DisableGPIOPullUp\n
elmot 1:d0dfbce63a89 920 * PUCRG PU0-15 LL_PWR_DisableGPIOPullUp\n
elmot 1:d0dfbce63a89 921 * PUCRH PU0-1 LL_PWR_DisableGPIOPullUp
elmot 1:d0dfbce63a89 922 * @param GPIO This parameter can be one of the following values:
elmot 1:d0dfbce63a89 923 * @arg @ref LL_PWR_GPIO_A
elmot 1:d0dfbce63a89 924 * @arg @ref LL_PWR_GPIO_B
elmot 1:d0dfbce63a89 925 * @arg @ref LL_PWR_GPIO_C
elmot 1:d0dfbce63a89 926 * @arg @ref LL_PWR_GPIO_D
elmot 1:d0dfbce63a89 927 * @arg @ref LL_PWR_GPIO_E
elmot 1:d0dfbce63a89 928 * @arg @ref LL_PWR_GPIO_F (*)
elmot 1:d0dfbce63a89 929 * @arg @ref LL_PWR_GPIO_G (*)
elmot 1:d0dfbce63a89 930 * @arg @ref LL_PWR_GPIO_H
elmot 1:d0dfbce63a89 931 *
elmot 1:d0dfbce63a89 932 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 933 * @param GPIONumber This parameter can be one of the following values:
elmot 1:d0dfbce63a89 934 * @arg @ref LL_PWR_GPIO_BIT_0
elmot 1:d0dfbce63a89 935 * @arg @ref LL_PWR_GPIO_BIT_1
elmot 1:d0dfbce63a89 936 * @arg @ref LL_PWR_GPIO_BIT_2
elmot 1:d0dfbce63a89 937 * @arg @ref LL_PWR_GPIO_BIT_3
elmot 1:d0dfbce63a89 938 * @arg @ref LL_PWR_GPIO_BIT_4
elmot 1:d0dfbce63a89 939 * @arg @ref LL_PWR_GPIO_BIT_5
elmot 1:d0dfbce63a89 940 * @arg @ref LL_PWR_GPIO_BIT_6
elmot 1:d0dfbce63a89 941 * @arg @ref LL_PWR_GPIO_BIT_7
elmot 1:d0dfbce63a89 942 * @arg @ref LL_PWR_GPIO_BIT_8
elmot 1:d0dfbce63a89 943 * @arg @ref LL_PWR_GPIO_BIT_9
elmot 1:d0dfbce63a89 944 * @arg @ref LL_PWR_GPIO_BIT_10
elmot 1:d0dfbce63a89 945 * @arg @ref LL_PWR_GPIO_BIT_11
elmot 1:d0dfbce63a89 946 * @arg @ref LL_PWR_GPIO_BIT_12
elmot 1:d0dfbce63a89 947 * @arg @ref LL_PWR_GPIO_BIT_13
elmot 1:d0dfbce63a89 948 * @arg @ref LL_PWR_GPIO_BIT_14
elmot 1:d0dfbce63a89 949 * @arg @ref LL_PWR_GPIO_BIT_15
elmot 1:d0dfbce63a89 950 * @retval None
elmot 1:d0dfbce63a89 951 */
elmot 1:d0dfbce63a89 952 __STATIC_INLINE void LL_PWR_DisableGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber)
elmot 1:d0dfbce63a89 953 {
elmot 1:d0dfbce63a89 954 CLEAR_BIT(*((uint32_t *)GPIO), GPIONumber);
elmot 1:d0dfbce63a89 955 }
elmot 1:d0dfbce63a89 956
elmot 1:d0dfbce63a89 957 /**
elmot 1:d0dfbce63a89 958 * @brief Check if GPIO pull-up state is enabled
elmot 1:d0dfbce63a89 959 * @rmtoll PUCRA PU0-15 LL_PWR_IsEnabledGPIOPullUp\n
elmot 1:d0dfbce63a89 960 * PUCRB PU0-15 LL_PWR_IsEnabledGPIOPullUp\n
elmot 1:d0dfbce63a89 961 * PUCRC PU0-15 LL_PWR_IsEnabledGPIOPullUp\n
elmot 1:d0dfbce63a89 962 * PUCRD PU0-15 LL_PWR_IsEnabledGPIOPullUp\n
elmot 1:d0dfbce63a89 963 * PUCRE PU0-15 LL_PWR_IsEnabledGPIOPullUp\n
elmot 1:d0dfbce63a89 964 * PUCRF PU0-15 LL_PWR_IsEnabledGPIOPullUp\n
elmot 1:d0dfbce63a89 965 * PUCRG PU0-15 LL_PWR_IsEnabledGPIOPullUp\n
elmot 1:d0dfbce63a89 966 * PUCRH PU0-1 LL_PWR_IsEnabledGPIOPullUp
elmot 1:d0dfbce63a89 967 * @param GPIO This parameter can be one of the following values:
elmot 1:d0dfbce63a89 968 * @arg @ref LL_PWR_GPIO_A
elmot 1:d0dfbce63a89 969 * @arg @ref LL_PWR_GPIO_B
elmot 1:d0dfbce63a89 970 * @arg @ref LL_PWR_GPIO_C
elmot 1:d0dfbce63a89 971 * @arg @ref LL_PWR_GPIO_D
elmot 1:d0dfbce63a89 972 * @arg @ref LL_PWR_GPIO_E
elmot 1:d0dfbce63a89 973 * @arg @ref LL_PWR_GPIO_F (*)
elmot 1:d0dfbce63a89 974 * @arg @ref LL_PWR_GPIO_G (*)
elmot 1:d0dfbce63a89 975 * @arg @ref LL_PWR_GPIO_H
elmot 1:d0dfbce63a89 976 *
elmot 1:d0dfbce63a89 977 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 978 * @param GPIONumber This parameter can be one of the following values:
elmot 1:d0dfbce63a89 979 * @arg @ref LL_PWR_GPIO_BIT_0
elmot 1:d0dfbce63a89 980 * @arg @ref LL_PWR_GPIO_BIT_1
elmot 1:d0dfbce63a89 981 * @arg @ref LL_PWR_GPIO_BIT_2
elmot 1:d0dfbce63a89 982 * @arg @ref LL_PWR_GPIO_BIT_3
elmot 1:d0dfbce63a89 983 * @arg @ref LL_PWR_GPIO_BIT_4
elmot 1:d0dfbce63a89 984 * @arg @ref LL_PWR_GPIO_BIT_5
elmot 1:d0dfbce63a89 985 * @arg @ref LL_PWR_GPIO_BIT_6
elmot 1:d0dfbce63a89 986 * @arg @ref LL_PWR_GPIO_BIT_7
elmot 1:d0dfbce63a89 987 * @arg @ref LL_PWR_GPIO_BIT_8
elmot 1:d0dfbce63a89 988 * @arg @ref LL_PWR_GPIO_BIT_9
elmot 1:d0dfbce63a89 989 * @arg @ref LL_PWR_GPIO_BIT_10
elmot 1:d0dfbce63a89 990 * @arg @ref LL_PWR_GPIO_BIT_11
elmot 1:d0dfbce63a89 991 * @arg @ref LL_PWR_GPIO_BIT_12
elmot 1:d0dfbce63a89 992 * @arg @ref LL_PWR_GPIO_BIT_13
elmot 1:d0dfbce63a89 993 * @arg @ref LL_PWR_GPIO_BIT_14
elmot 1:d0dfbce63a89 994 * @arg @ref LL_PWR_GPIO_BIT_15
elmot 1:d0dfbce63a89 995 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 996 */
elmot 1:d0dfbce63a89 997 __STATIC_INLINE uint32_t LL_PWR_IsEnabledGPIOPullUp(uint32_t GPIO, uint32_t GPIONumber)
elmot 1:d0dfbce63a89 998 {
elmot 1:d0dfbce63a89 999 return (READ_BIT(*((uint32_t *)(GPIO)), GPIONumber) == (GPIONumber));
elmot 1:d0dfbce63a89 1000 }
elmot 1:d0dfbce63a89 1001
elmot 1:d0dfbce63a89 1002 /**
elmot 1:d0dfbce63a89 1003 * @brief Enable GPIO pull-down state in Standby and Shutdown modes
elmot 1:d0dfbce63a89 1004 * @rmtoll PDCRA PD0-15 LL_PWR_EnableGPIOPullDown\n
elmot 1:d0dfbce63a89 1005 * PDCRB PD0-15 LL_PWR_EnableGPIOPullDown\n
elmot 1:d0dfbce63a89 1006 * PDCRC PD0-15 LL_PWR_EnableGPIOPullDown\n
elmot 1:d0dfbce63a89 1007 * PDCRD PD0-15 LL_PWR_EnableGPIOPullDown\n
elmot 1:d0dfbce63a89 1008 * PDCRE PD0-15 LL_PWR_EnableGPIOPullDown\n
elmot 1:d0dfbce63a89 1009 * PDCRF PD0-15 LL_PWR_EnableGPIOPullDown\n
elmot 1:d0dfbce63a89 1010 * PDCRG PD0-15 LL_PWR_EnableGPIOPullDown\n
elmot 1:d0dfbce63a89 1011 * PDCRH PD0-1 LL_PWR_EnableGPIOPullDown
elmot 1:d0dfbce63a89 1012 * @param GPIO This parameter can be one of the following values:
elmot 1:d0dfbce63a89 1013 * @arg @ref LL_PWR_GPIO_A
elmot 1:d0dfbce63a89 1014 * @arg @ref LL_PWR_GPIO_B
elmot 1:d0dfbce63a89 1015 * @arg @ref LL_PWR_GPIO_C
elmot 1:d0dfbce63a89 1016 * @arg @ref LL_PWR_GPIO_D
elmot 1:d0dfbce63a89 1017 * @arg @ref LL_PWR_GPIO_E
elmot 1:d0dfbce63a89 1018 * @arg @ref LL_PWR_GPIO_F (*)
elmot 1:d0dfbce63a89 1019 * @arg @ref LL_PWR_GPIO_G (*)
elmot 1:d0dfbce63a89 1020 * @arg @ref LL_PWR_GPIO_H
elmot 1:d0dfbce63a89 1021 *
elmot 1:d0dfbce63a89 1022 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 1023 * @param GPIONumber This parameter can be one of the following values:
elmot 1:d0dfbce63a89 1024 * @arg @ref LL_PWR_GPIO_BIT_0
elmot 1:d0dfbce63a89 1025 * @arg @ref LL_PWR_GPIO_BIT_1
elmot 1:d0dfbce63a89 1026 * @arg @ref LL_PWR_GPIO_BIT_2
elmot 1:d0dfbce63a89 1027 * @arg @ref LL_PWR_GPIO_BIT_3
elmot 1:d0dfbce63a89 1028 * @arg @ref LL_PWR_GPIO_BIT_4
elmot 1:d0dfbce63a89 1029 * @arg @ref LL_PWR_GPIO_BIT_5
elmot 1:d0dfbce63a89 1030 * @arg @ref LL_PWR_GPIO_BIT_6
elmot 1:d0dfbce63a89 1031 * @arg @ref LL_PWR_GPIO_BIT_7
elmot 1:d0dfbce63a89 1032 * @arg @ref LL_PWR_GPIO_BIT_8
elmot 1:d0dfbce63a89 1033 * @arg @ref LL_PWR_GPIO_BIT_9
elmot 1:d0dfbce63a89 1034 * @arg @ref LL_PWR_GPIO_BIT_10
elmot 1:d0dfbce63a89 1035 * @arg @ref LL_PWR_GPIO_BIT_11
elmot 1:d0dfbce63a89 1036 * @arg @ref LL_PWR_GPIO_BIT_12
elmot 1:d0dfbce63a89 1037 * @arg @ref LL_PWR_GPIO_BIT_13
elmot 1:d0dfbce63a89 1038 * @arg @ref LL_PWR_GPIO_BIT_14
elmot 1:d0dfbce63a89 1039 * @arg @ref LL_PWR_GPIO_BIT_15
elmot 1:d0dfbce63a89 1040 * @retval None
elmot 1:d0dfbce63a89 1041 */
elmot 1:d0dfbce63a89 1042 __STATIC_INLINE void LL_PWR_EnableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber)
elmot 1:d0dfbce63a89 1043 {
elmot 1:d0dfbce63a89 1044 register uint32_t temp = (uint32_t)(GPIO) + 4;
elmot 1:d0dfbce63a89 1045 SET_BIT(*((uint32_t *)(temp)), GPIONumber);
elmot 1:d0dfbce63a89 1046 }
elmot 1:d0dfbce63a89 1047
elmot 1:d0dfbce63a89 1048 /**
elmot 1:d0dfbce63a89 1049 * @brief Disable GPIO pull-down state in Standby and Shutdown modes
elmot 1:d0dfbce63a89 1050 * @rmtoll PDCRA PD0-15 LL_PWR_DisableGPIOPullDown\n
elmot 1:d0dfbce63a89 1051 * PDCRB PD0-15 LL_PWR_DisableGPIOPullDown\n
elmot 1:d0dfbce63a89 1052 * PDCRC PD0-15 LL_PWR_DisableGPIOPullDown\n
elmot 1:d0dfbce63a89 1053 * PDCRD PD0-15 LL_PWR_DisableGPIOPullDown\n
elmot 1:d0dfbce63a89 1054 * PDCRE PD0-15 LL_PWR_DisableGPIOPullDown\n
elmot 1:d0dfbce63a89 1055 * PDCRF PD0-15 LL_PWR_DisableGPIOPullDown\n
elmot 1:d0dfbce63a89 1056 * PDCRG PD0-15 LL_PWR_DisableGPIOPullDown\n
elmot 1:d0dfbce63a89 1057 * PDCRH PD0-1 LL_PWR_DisableGPIOPullDown
elmot 1:d0dfbce63a89 1058 * @param GPIO This parameter can be one of the following values:
elmot 1:d0dfbce63a89 1059 * @arg @ref LL_PWR_GPIO_A
elmot 1:d0dfbce63a89 1060 * @arg @ref LL_PWR_GPIO_B
elmot 1:d0dfbce63a89 1061 * @arg @ref LL_PWR_GPIO_C
elmot 1:d0dfbce63a89 1062 * @arg @ref LL_PWR_GPIO_D
elmot 1:d0dfbce63a89 1063 * @arg @ref LL_PWR_GPIO_E
elmot 1:d0dfbce63a89 1064 * @arg @ref LL_PWR_GPIO_F (*)
elmot 1:d0dfbce63a89 1065 * @arg @ref LL_PWR_GPIO_G (*)
elmot 1:d0dfbce63a89 1066 * @arg @ref LL_PWR_GPIO_H
elmot 1:d0dfbce63a89 1067 *
elmot 1:d0dfbce63a89 1068 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 1069 * @param GPIONumber This parameter can be one of the following values:
elmot 1:d0dfbce63a89 1070 * @arg @ref LL_PWR_GPIO_BIT_0
elmot 1:d0dfbce63a89 1071 * @arg @ref LL_PWR_GPIO_BIT_1
elmot 1:d0dfbce63a89 1072 * @arg @ref LL_PWR_GPIO_BIT_2
elmot 1:d0dfbce63a89 1073 * @arg @ref LL_PWR_GPIO_BIT_3
elmot 1:d0dfbce63a89 1074 * @arg @ref LL_PWR_GPIO_BIT_4
elmot 1:d0dfbce63a89 1075 * @arg @ref LL_PWR_GPIO_BIT_5
elmot 1:d0dfbce63a89 1076 * @arg @ref LL_PWR_GPIO_BIT_6
elmot 1:d0dfbce63a89 1077 * @arg @ref LL_PWR_GPIO_BIT_7
elmot 1:d0dfbce63a89 1078 * @arg @ref LL_PWR_GPIO_BIT_8
elmot 1:d0dfbce63a89 1079 * @arg @ref LL_PWR_GPIO_BIT_9
elmot 1:d0dfbce63a89 1080 * @arg @ref LL_PWR_GPIO_BIT_10
elmot 1:d0dfbce63a89 1081 * @arg @ref LL_PWR_GPIO_BIT_11
elmot 1:d0dfbce63a89 1082 * @arg @ref LL_PWR_GPIO_BIT_12
elmot 1:d0dfbce63a89 1083 * @arg @ref LL_PWR_GPIO_BIT_13
elmot 1:d0dfbce63a89 1084 * @arg @ref LL_PWR_GPIO_BIT_14
elmot 1:d0dfbce63a89 1085 * @arg @ref LL_PWR_GPIO_BIT_15
elmot 1:d0dfbce63a89 1086 * @retval None
elmot 1:d0dfbce63a89 1087 */
elmot 1:d0dfbce63a89 1088 __STATIC_INLINE void LL_PWR_DisableGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber)
elmot 1:d0dfbce63a89 1089 {
elmot 1:d0dfbce63a89 1090 register uint32_t temp = (uint32_t)(GPIO) + 4;
elmot 1:d0dfbce63a89 1091 CLEAR_BIT(*((uint32_t *)(temp)), GPIONumber);
elmot 1:d0dfbce63a89 1092 }
elmot 1:d0dfbce63a89 1093
elmot 1:d0dfbce63a89 1094 /**
elmot 1:d0dfbce63a89 1095 * @brief Check if GPIO pull-down state is enabled
elmot 1:d0dfbce63a89 1096 * @rmtoll PDCRA PD0-15 LL_PWR_IsEnabledGPIOPullDown\n
elmot 1:d0dfbce63a89 1097 * PDCRB PD0-15 LL_PWR_IsEnabledGPIOPullDown\n
elmot 1:d0dfbce63a89 1098 * PDCRC PD0-15 LL_PWR_IsEnabledGPIOPullDown\n
elmot 1:d0dfbce63a89 1099 * PDCRD PD0-15 LL_PWR_IsEnabledGPIOPullDown\n
elmot 1:d0dfbce63a89 1100 * PDCRE PD0-15 LL_PWR_IsEnabledGPIOPullDown\n
elmot 1:d0dfbce63a89 1101 * PDCRF PD0-15 LL_PWR_IsEnabledGPIOPullDown\n
elmot 1:d0dfbce63a89 1102 * PDCRG PD0-15 LL_PWR_IsEnabledGPIOPullDown\n
elmot 1:d0dfbce63a89 1103 * PDCRH PD0-1 LL_PWR_IsEnabledGPIOPullDown
elmot 1:d0dfbce63a89 1104 * @param GPIO This parameter can be one of the following values:
elmot 1:d0dfbce63a89 1105 * @arg @ref LL_PWR_GPIO_A
elmot 1:d0dfbce63a89 1106 * @arg @ref LL_PWR_GPIO_B
elmot 1:d0dfbce63a89 1107 * @arg @ref LL_PWR_GPIO_C
elmot 1:d0dfbce63a89 1108 * @arg @ref LL_PWR_GPIO_D
elmot 1:d0dfbce63a89 1109 * @arg @ref LL_PWR_GPIO_E
elmot 1:d0dfbce63a89 1110 * @arg @ref LL_PWR_GPIO_F (*)
elmot 1:d0dfbce63a89 1111 * @arg @ref LL_PWR_GPIO_G (*)
elmot 1:d0dfbce63a89 1112 * @arg @ref LL_PWR_GPIO_H
elmot 1:d0dfbce63a89 1113 *
elmot 1:d0dfbce63a89 1114 * (*) value not defined in all devices
elmot 1:d0dfbce63a89 1115 * @param GPIONumber This parameter can be one of the following values:
elmot 1:d0dfbce63a89 1116 * @arg @ref LL_PWR_GPIO_BIT_0
elmot 1:d0dfbce63a89 1117 * @arg @ref LL_PWR_GPIO_BIT_1
elmot 1:d0dfbce63a89 1118 * @arg @ref LL_PWR_GPIO_BIT_2
elmot 1:d0dfbce63a89 1119 * @arg @ref LL_PWR_GPIO_BIT_3
elmot 1:d0dfbce63a89 1120 * @arg @ref LL_PWR_GPIO_BIT_4
elmot 1:d0dfbce63a89 1121 * @arg @ref LL_PWR_GPIO_BIT_5
elmot 1:d0dfbce63a89 1122 * @arg @ref LL_PWR_GPIO_BIT_6
elmot 1:d0dfbce63a89 1123 * @arg @ref LL_PWR_GPIO_BIT_7
elmot 1:d0dfbce63a89 1124 * @arg @ref LL_PWR_GPIO_BIT_8
elmot 1:d0dfbce63a89 1125 * @arg @ref LL_PWR_GPIO_BIT_9
elmot 1:d0dfbce63a89 1126 * @arg @ref LL_PWR_GPIO_BIT_10
elmot 1:d0dfbce63a89 1127 * @arg @ref LL_PWR_GPIO_BIT_11
elmot 1:d0dfbce63a89 1128 * @arg @ref LL_PWR_GPIO_BIT_12
elmot 1:d0dfbce63a89 1129 * @arg @ref LL_PWR_GPIO_BIT_13
elmot 1:d0dfbce63a89 1130 * @arg @ref LL_PWR_GPIO_BIT_14
elmot 1:d0dfbce63a89 1131 * @arg @ref LL_PWR_GPIO_BIT_15
elmot 1:d0dfbce63a89 1132 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1133 */
elmot 1:d0dfbce63a89 1134 __STATIC_INLINE uint32_t LL_PWR_IsEnabledGPIOPullDown(uint32_t GPIO, uint32_t GPIONumber)
elmot 1:d0dfbce63a89 1135 {
elmot 1:d0dfbce63a89 1136 register uint32_t temp = (uint32_t)(GPIO) + 4;
elmot 1:d0dfbce63a89 1137 return (READ_BIT(*((uint32_t *)(temp)), GPIONumber) == (GPIONumber));
elmot 1:d0dfbce63a89 1138 }
elmot 1:d0dfbce63a89 1139
elmot 1:d0dfbce63a89 1140 /**
elmot 1:d0dfbce63a89 1141 * @}
elmot 1:d0dfbce63a89 1142 */
elmot 1:d0dfbce63a89 1143
elmot 1:d0dfbce63a89 1144 /** @defgroup PWR_LL_EF_FLAG_Management FLAG_Management
elmot 1:d0dfbce63a89 1145 * @{
elmot 1:d0dfbce63a89 1146 */
elmot 1:d0dfbce63a89 1147
elmot 1:d0dfbce63a89 1148 /**
elmot 1:d0dfbce63a89 1149 * @brief Get Internal Wake-up line Flag
elmot 1:d0dfbce63a89 1150 * @rmtoll SR1 WUFI LL_PWR_IsActiveFlag_InternWU
elmot 1:d0dfbce63a89 1151 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1152 */
elmot 1:d0dfbce63a89 1153 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_InternWU(void)
elmot 1:d0dfbce63a89 1154 {
elmot 1:d0dfbce63a89 1155 return (READ_BIT(PWR->SR1, PWR_SR1_WUFI) == (PWR_SR1_WUFI));
elmot 1:d0dfbce63a89 1156 }
elmot 1:d0dfbce63a89 1157
elmot 1:d0dfbce63a89 1158 /**
elmot 1:d0dfbce63a89 1159 * @brief Get Stand-By Flag
elmot 1:d0dfbce63a89 1160 * @rmtoll SR1 SBF LL_PWR_IsActiveFlag_SB
elmot 1:d0dfbce63a89 1161 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1162 */
elmot 1:d0dfbce63a89 1163 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_SB(void)
elmot 1:d0dfbce63a89 1164 {
elmot 1:d0dfbce63a89 1165 return (READ_BIT(PWR->SR1, PWR_SR1_SBF) == (PWR_SR1_SBF));
elmot 1:d0dfbce63a89 1166 }
elmot 1:d0dfbce63a89 1167
elmot 1:d0dfbce63a89 1168 /**
elmot 1:d0dfbce63a89 1169 * @brief Get Wake-up Flag 5
elmot 1:d0dfbce63a89 1170 * @rmtoll SR1 WUF5 LL_PWR_IsActiveFlag_WU5
elmot 1:d0dfbce63a89 1171 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1172 */
elmot 1:d0dfbce63a89 1173 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU5(void)
elmot 1:d0dfbce63a89 1174 {
elmot 1:d0dfbce63a89 1175 return (READ_BIT(PWR->SR1, PWR_SR1_WUF5) == (PWR_SR1_WUF5));
elmot 1:d0dfbce63a89 1176 }
elmot 1:d0dfbce63a89 1177
elmot 1:d0dfbce63a89 1178 /**
elmot 1:d0dfbce63a89 1179 * @brief Get Wake-up Flag 4
elmot 1:d0dfbce63a89 1180 * @rmtoll SR1 WUF4 LL_PWR_IsActiveFlag_WU4
elmot 1:d0dfbce63a89 1181 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1182 */
elmot 1:d0dfbce63a89 1183 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU4(void)
elmot 1:d0dfbce63a89 1184 {
elmot 1:d0dfbce63a89 1185 return (READ_BIT(PWR->SR1, PWR_SR1_WUF4) == (PWR_SR1_WUF4));
elmot 1:d0dfbce63a89 1186 }
elmot 1:d0dfbce63a89 1187
elmot 1:d0dfbce63a89 1188 /**
elmot 1:d0dfbce63a89 1189 * @brief Get Wake-up Flag 3
elmot 1:d0dfbce63a89 1190 * @rmtoll SR1 WUF3 LL_PWR_IsActiveFlag_WU3
elmot 1:d0dfbce63a89 1191 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1192 */
elmot 1:d0dfbce63a89 1193 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU3(void)
elmot 1:d0dfbce63a89 1194 {
elmot 1:d0dfbce63a89 1195 return (READ_BIT(PWR->SR1, PWR_SR1_WUF3) == (PWR_SR1_WUF3));
elmot 1:d0dfbce63a89 1196 }
elmot 1:d0dfbce63a89 1197
elmot 1:d0dfbce63a89 1198 /**
elmot 1:d0dfbce63a89 1199 * @brief Get Wake-up Flag 2
elmot 1:d0dfbce63a89 1200 * @rmtoll SR1 WUF2 LL_PWR_IsActiveFlag_WU2
elmot 1:d0dfbce63a89 1201 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1202 */
elmot 1:d0dfbce63a89 1203 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU2(void)
elmot 1:d0dfbce63a89 1204 {
elmot 1:d0dfbce63a89 1205 return (READ_BIT(PWR->SR1, PWR_SR1_WUF2) == (PWR_SR1_WUF2));
elmot 1:d0dfbce63a89 1206 }
elmot 1:d0dfbce63a89 1207
elmot 1:d0dfbce63a89 1208 /**
elmot 1:d0dfbce63a89 1209 * @brief Get Wake-up Flag 1
elmot 1:d0dfbce63a89 1210 * @rmtoll SR1 WUF1 LL_PWR_IsActiveFlag_WU1
elmot 1:d0dfbce63a89 1211 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1212 */
elmot 1:d0dfbce63a89 1213 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_WU1(void)
elmot 1:d0dfbce63a89 1214 {
elmot 1:d0dfbce63a89 1215 return (READ_BIT(PWR->SR1, PWR_SR1_WUF1) == (PWR_SR1_WUF1));
elmot 1:d0dfbce63a89 1216 }
elmot 1:d0dfbce63a89 1217
elmot 1:d0dfbce63a89 1218 /**
elmot 1:d0dfbce63a89 1219 * @brief Clear Stand-By Flag
elmot 1:d0dfbce63a89 1220 * @rmtoll SCR CSBF LL_PWR_ClearFlag_SB
elmot 1:d0dfbce63a89 1221 * @retval None
elmot 1:d0dfbce63a89 1222 */
elmot 1:d0dfbce63a89 1223 __STATIC_INLINE void LL_PWR_ClearFlag_SB(void)
elmot 1:d0dfbce63a89 1224 {
elmot 1:d0dfbce63a89 1225 WRITE_REG(PWR->SCR, PWR_SCR_CSBF);
elmot 1:d0dfbce63a89 1226 }
elmot 1:d0dfbce63a89 1227
elmot 1:d0dfbce63a89 1228 /**
elmot 1:d0dfbce63a89 1229 * @brief Clear Wake-up Flags
elmot 1:d0dfbce63a89 1230 * @rmtoll SCR CWUF LL_PWR_ClearFlag_WU
elmot 1:d0dfbce63a89 1231 * @retval None
elmot 1:d0dfbce63a89 1232 */
elmot 1:d0dfbce63a89 1233 __STATIC_INLINE void LL_PWR_ClearFlag_WU(void)
elmot 1:d0dfbce63a89 1234 {
elmot 1:d0dfbce63a89 1235 WRITE_REG(PWR->SCR, PWR_SCR_CWUF);
elmot 1:d0dfbce63a89 1236 }
elmot 1:d0dfbce63a89 1237
elmot 1:d0dfbce63a89 1238 /**
elmot 1:d0dfbce63a89 1239 * @brief Clear Wake-up Flag 5
elmot 1:d0dfbce63a89 1240 * @rmtoll SCR CWUF5 LL_PWR_ClearFlag_WU5
elmot 1:d0dfbce63a89 1241 * @retval None
elmot 1:d0dfbce63a89 1242 */
elmot 1:d0dfbce63a89 1243 __STATIC_INLINE void LL_PWR_ClearFlag_WU5(void)
elmot 1:d0dfbce63a89 1244 {
elmot 1:d0dfbce63a89 1245 WRITE_REG(PWR->SCR, PWR_SCR_CWUF5);
elmot 1:d0dfbce63a89 1246 }
elmot 1:d0dfbce63a89 1247
elmot 1:d0dfbce63a89 1248 /**
elmot 1:d0dfbce63a89 1249 * @brief Clear Wake-up Flag 4
elmot 1:d0dfbce63a89 1250 * @rmtoll SCR CWUF4 LL_PWR_ClearFlag_WU4
elmot 1:d0dfbce63a89 1251 * @retval None
elmot 1:d0dfbce63a89 1252 */
elmot 1:d0dfbce63a89 1253 __STATIC_INLINE void LL_PWR_ClearFlag_WU4(void)
elmot 1:d0dfbce63a89 1254 {
elmot 1:d0dfbce63a89 1255 WRITE_REG(PWR->SCR, PWR_SCR_CWUF4);
elmot 1:d0dfbce63a89 1256 }
elmot 1:d0dfbce63a89 1257
elmot 1:d0dfbce63a89 1258 /**
elmot 1:d0dfbce63a89 1259 * @brief Clear Wake-up Flag 3
elmot 1:d0dfbce63a89 1260 * @rmtoll SCR CWUF3 LL_PWR_ClearFlag_WU3
elmot 1:d0dfbce63a89 1261 * @retval None
elmot 1:d0dfbce63a89 1262 */
elmot 1:d0dfbce63a89 1263 __STATIC_INLINE void LL_PWR_ClearFlag_WU3(void)
elmot 1:d0dfbce63a89 1264 {
elmot 1:d0dfbce63a89 1265 WRITE_REG(PWR->SCR, PWR_SCR_CWUF3);
elmot 1:d0dfbce63a89 1266 }
elmot 1:d0dfbce63a89 1267
elmot 1:d0dfbce63a89 1268 /**
elmot 1:d0dfbce63a89 1269 * @brief Clear Wake-up Flag 2
elmot 1:d0dfbce63a89 1270 * @rmtoll SCR CWUF2 LL_PWR_ClearFlag_WU2
elmot 1:d0dfbce63a89 1271 * @retval None
elmot 1:d0dfbce63a89 1272 */
elmot 1:d0dfbce63a89 1273 __STATIC_INLINE void LL_PWR_ClearFlag_WU2(void)
elmot 1:d0dfbce63a89 1274 {
elmot 1:d0dfbce63a89 1275 WRITE_REG(PWR->SCR, PWR_SCR_CWUF2);
elmot 1:d0dfbce63a89 1276 }
elmot 1:d0dfbce63a89 1277
elmot 1:d0dfbce63a89 1278 /**
elmot 1:d0dfbce63a89 1279 * @brief Clear Wake-up Flag 1
elmot 1:d0dfbce63a89 1280 * @rmtoll SCR CWUF1 LL_PWR_ClearFlag_WU1
elmot 1:d0dfbce63a89 1281 * @retval None
elmot 1:d0dfbce63a89 1282 */
elmot 1:d0dfbce63a89 1283 __STATIC_INLINE void LL_PWR_ClearFlag_WU1(void)
elmot 1:d0dfbce63a89 1284 {
elmot 1:d0dfbce63a89 1285 WRITE_REG(PWR->SCR, PWR_SCR_CWUF1);
elmot 1:d0dfbce63a89 1286 }
elmot 1:d0dfbce63a89 1287
elmot 1:d0dfbce63a89 1288 /**
elmot 1:d0dfbce63a89 1289 * @brief Indicate whether VDDA voltage is below or above PVM4 threshold
elmot 1:d0dfbce63a89 1290 * @rmtoll SR2 PVMO4 LL_PWR_IsActiveFlag_PVMO4
elmot 1:d0dfbce63a89 1291 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1292 */
elmot 1:d0dfbce63a89 1293 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVMO4(void)
elmot 1:d0dfbce63a89 1294 {
elmot 1:d0dfbce63a89 1295 return (READ_BIT(PWR->SR2, PWR_SR2_PVMO4) == (PWR_SR2_PVMO4));
elmot 1:d0dfbce63a89 1296 }
elmot 1:d0dfbce63a89 1297
elmot 1:d0dfbce63a89 1298 /**
elmot 1:d0dfbce63a89 1299 * @brief Indicate whether VDDA voltage is below or above PVM3 threshold
elmot 1:d0dfbce63a89 1300 * @rmtoll SR2 PVMO3 LL_PWR_IsActiveFlag_PVMO3
elmot 1:d0dfbce63a89 1301 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1302 */
elmot 1:d0dfbce63a89 1303 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVMO3(void)
elmot 1:d0dfbce63a89 1304 {
elmot 1:d0dfbce63a89 1305 return (READ_BIT(PWR->SR2, PWR_SR2_PVMO3) == (PWR_SR2_PVMO3));
elmot 1:d0dfbce63a89 1306 }
elmot 1:d0dfbce63a89 1307
elmot 1:d0dfbce63a89 1308 #if defined(PWR_SR2_PVMO2)
elmot 1:d0dfbce63a89 1309 /**
elmot 1:d0dfbce63a89 1310 * @brief Indicate whether VDDIO2 voltage is below or above PVM2 threshold
elmot 1:d0dfbce63a89 1311 * @rmtoll SR2 PVMO2 LL_PWR_IsActiveFlag_PVMO2
elmot 1:d0dfbce63a89 1312 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1313 */
elmot 1:d0dfbce63a89 1314 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVMO2(void)
elmot 1:d0dfbce63a89 1315 {
elmot 1:d0dfbce63a89 1316 return (READ_BIT(PWR->SR2, PWR_SR2_PVMO2) == (PWR_SR2_PVMO2));
elmot 1:d0dfbce63a89 1317 }
elmot 1:d0dfbce63a89 1318 #endif /* PWR_SR2_PVMO2 */
elmot 1:d0dfbce63a89 1319
elmot 1:d0dfbce63a89 1320 #if defined(USB_OTG_FS)
elmot 1:d0dfbce63a89 1321 /**
elmot 1:d0dfbce63a89 1322 * @brief Indicate whether VDDUSB voltage is below or above PVM1 threshold
elmot 1:d0dfbce63a89 1323 * @rmtoll SR2 PVMO1 LL_PWR_IsActiveFlag_PVMO1
elmot 1:d0dfbce63a89 1324 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1325 */
elmot 1:d0dfbce63a89 1326 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVMO1(void)
elmot 1:d0dfbce63a89 1327 {
elmot 1:d0dfbce63a89 1328 return (READ_BIT(PWR->SR2, PWR_SR2_PVMO1) == (PWR_SR2_PVMO1));
elmot 1:d0dfbce63a89 1329 }
elmot 1:d0dfbce63a89 1330 #endif /* USB_OTG_FS */
elmot 1:d0dfbce63a89 1331
elmot 1:d0dfbce63a89 1332 /**
elmot 1:d0dfbce63a89 1333 * @brief Indicate whether VDD voltage is below or above the selected PVD threshold
elmot 1:d0dfbce63a89 1334 * @rmtoll SR2 PVDO LL_PWR_IsActiveFlag_PVDO
elmot 1:d0dfbce63a89 1335 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1336 */
elmot 1:d0dfbce63a89 1337 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_PVDO(void)
elmot 1:d0dfbce63a89 1338 {
elmot 1:d0dfbce63a89 1339 return (READ_BIT(PWR->SR2, PWR_SR2_PVDO) == (PWR_SR2_PVDO));
elmot 1:d0dfbce63a89 1340 }
elmot 1:d0dfbce63a89 1341
elmot 1:d0dfbce63a89 1342 /**
elmot 1:d0dfbce63a89 1343 * @brief Indicate whether the regulator is ready in the selected voltage range or if its output voltage is still changing to the required voltage level
elmot 1:d0dfbce63a89 1344 * @rmtoll SR2 VOSF LL_PWR_IsActiveFlag_VOSF
elmot 1:d0dfbce63a89 1345 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1346 */
elmot 1:d0dfbce63a89 1347 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_VOSF(void)
elmot 1:d0dfbce63a89 1348 {
elmot 1:d0dfbce63a89 1349 return (READ_BIT(PWR->SR2, PWR_SR2_VOSF) == (PWR_SR2_VOSF));
elmot 1:d0dfbce63a89 1350 }
elmot 1:d0dfbce63a89 1351
elmot 1:d0dfbce63a89 1352 /**
elmot 1:d0dfbce63a89 1353 * @brief Indicate whether the regulator is ready in main mode or is in low-power mode
elmot 1:d0dfbce63a89 1354 * @note: Take care, return value "0" means the regulator is ready. Return value "1" means the output voltage range is still changing.
elmot 1:d0dfbce63a89 1355 * @rmtoll SR2 REGLPF LL_PWR_IsActiveFlag_REGLPF
elmot 1:d0dfbce63a89 1356 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1357 */
elmot 1:d0dfbce63a89 1358 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_REGLPF(void)
elmot 1:d0dfbce63a89 1359 {
elmot 1:d0dfbce63a89 1360 return (READ_BIT(PWR->SR2, PWR_SR2_REGLPF) == (PWR_SR2_REGLPF));
elmot 1:d0dfbce63a89 1361 }
elmot 1:d0dfbce63a89 1362
elmot 1:d0dfbce63a89 1363 /**
elmot 1:d0dfbce63a89 1364 * @brief Indicate whether or not the low-power regulator is ready
elmot 1:d0dfbce63a89 1365 * @rmtoll SR2 REGLPS LL_PWR_IsActiveFlag_REGLPS
elmot 1:d0dfbce63a89 1366 * @retval State of bit (1 or 0).
elmot 1:d0dfbce63a89 1367 */
elmot 1:d0dfbce63a89 1368 __STATIC_INLINE uint32_t LL_PWR_IsActiveFlag_REGLPS(void)
elmot 1:d0dfbce63a89 1369 {
elmot 1:d0dfbce63a89 1370 return (READ_BIT(PWR->SR2, PWR_SR2_REGLPS) == (PWR_SR2_REGLPS));
elmot 1:d0dfbce63a89 1371 }
elmot 1:d0dfbce63a89 1372
elmot 1:d0dfbce63a89 1373 #if defined(USE_FULL_LL_DRIVER)
elmot 1:d0dfbce63a89 1374 /** @defgroup PWR_LL_EF_Init De-initialization function
elmot 1:d0dfbce63a89 1375 * @{
elmot 1:d0dfbce63a89 1376 */
elmot 1:d0dfbce63a89 1377 ErrorStatus LL_PWR_DeInit(void);
elmot 1:d0dfbce63a89 1378 /**
elmot 1:d0dfbce63a89 1379 * @}
elmot 1:d0dfbce63a89 1380 */
elmot 1:d0dfbce63a89 1381 #endif /* USE_FULL_LL_DRIVER */
elmot 1:d0dfbce63a89 1382
elmot 1:d0dfbce63a89 1383 /**
elmot 1:d0dfbce63a89 1384 * @}
elmot 1:d0dfbce63a89 1385 */
elmot 1:d0dfbce63a89 1386
elmot 1:d0dfbce63a89 1387
elmot 1:d0dfbce63a89 1388 /**
elmot 1:d0dfbce63a89 1389 * @}
elmot 1:d0dfbce63a89 1390 */
elmot 1:d0dfbce63a89 1391
elmot 1:d0dfbce63a89 1392 /**
elmot 1:d0dfbce63a89 1393 * @}
elmot 1:d0dfbce63a89 1394 */
elmot 1:d0dfbce63a89 1395
elmot 1:d0dfbce63a89 1396 #endif /* defined(PWR) */
elmot 1:d0dfbce63a89 1397
elmot 1:d0dfbce63a89 1398 /**
elmot 1:d0dfbce63a89 1399 * @}
elmot 1:d0dfbce63a89 1400 */
elmot 1:d0dfbce63a89 1401
elmot 1:d0dfbce63a89 1402 #ifdef __cplusplus
elmot 1:d0dfbce63a89 1403 }
elmot 1:d0dfbce63a89 1404 #endif
elmot 1:d0dfbce63a89 1405
elmot 1:d0dfbce63a89 1406 #endif /* __STM32L4xx_LL_PWR_H */
elmot 1:d0dfbce63a89 1407
elmot 1:d0dfbce63a89 1408 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/