stm32f7xx_hal_pwr_ex.h
Go to the documentation of this file.
1 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef __STM32F7xx_HAL_PWR_EX_H
22 #define __STM32F7xx_HAL_PWR_EX_H
23 
24 #ifdef __cplusplus
25  extern "C" {
26 #endif
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32f7xx_hal_def.h"
30 
39 /* Exported types ------------------------------------------------------------*/
40 /* Exported constants --------------------------------------------------------*/
47 #define PWR_WAKEUP_PIN1 PWR_CSR2_EWUP1
48 #define PWR_WAKEUP_PIN2 PWR_CSR2_EWUP2
49 #define PWR_WAKEUP_PIN3 PWR_CSR2_EWUP3
50 #define PWR_WAKEUP_PIN4 PWR_CSR2_EWUP4
51 #define PWR_WAKEUP_PIN5 PWR_CSR2_EWUP5
52 #define PWR_WAKEUP_PIN6 PWR_CSR2_EWUP6
53 #define PWR_WAKEUP_PIN1_HIGH PWR_CSR2_EWUP1
54 #define PWR_WAKEUP_PIN2_HIGH PWR_CSR2_EWUP2
55 #define PWR_WAKEUP_PIN3_HIGH PWR_CSR2_EWUP3
56 #define PWR_WAKEUP_PIN4_HIGH PWR_CSR2_EWUP4
57 #define PWR_WAKEUP_PIN5_HIGH PWR_CSR2_EWUP5
58 #define PWR_WAKEUP_PIN6_HIGH PWR_CSR2_EWUP6
59 #define PWR_WAKEUP_PIN1_LOW (uint32_t)((PWR_CR2_WUPP1<<6) | PWR_CSR2_EWUP1)
60 #define PWR_WAKEUP_PIN2_LOW (uint32_t)((PWR_CR2_WUPP2<<6) | PWR_CSR2_EWUP2)
61 #define PWR_WAKEUP_PIN3_LOW (uint32_t)((PWR_CR2_WUPP3<<6) | PWR_CSR2_EWUP3)
62 #define PWR_WAKEUP_PIN4_LOW (uint32_t)((PWR_CR2_WUPP4<<6) | PWR_CSR2_EWUP4)
63 #define PWR_WAKEUP_PIN5_LOW (uint32_t)((PWR_CR2_WUPP5<<6) | PWR_CSR2_EWUP5)
64 #define PWR_WAKEUP_PIN6_LOW (uint32_t)((PWR_CR2_WUPP6<<6) | PWR_CSR2_EWUP6)
65 
73 #define PWR_MAINREGULATOR_UNDERDRIVE_ON PWR_CR1_MRUDS
74 #define PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON ((uint32_t)(PWR_CR1_LPDS | PWR_CR1_LPUDS))
75 
82 #define PWR_FLAG_ODRDY PWR_CSR1_ODRDY
83 #define PWR_FLAG_ODSWRDY PWR_CSR1_ODSWRDY
84 #define PWR_FLAG_UDRDY PWR_CSR1_UDRDY
85 
92 #define PWR_WAKEUP_PIN_FLAG1 PWR_CSR2_WUPF1
93 #define PWR_WAKEUP_PIN_FLAG2 PWR_CSR2_WUPF2
94 #define PWR_WAKEUP_PIN_FLAG3 PWR_CSR2_WUPF3
95 #define PWR_WAKEUP_PIN_FLAG4 PWR_CSR2_WUPF4
96 #define PWR_WAKEUP_PIN_FLAG5 PWR_CSR2_WUPF5
97 #define PWR_WAKEUP_PIN_FLAG6 PWR_CSR2_WUPF6
98 
106 /* Exported macro ------------------------------------------------------------*/
112 #define __HAL_PWR_OVERDRIVE_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_ODEN)
113 #define __HAL_PWR_OVERDRIVE_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_ODEN))
114 
117 #define __HAL_PWR_OVERDRIVESWITCHING_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_ODSWEN)
118 #define __HAL_PWR_OVERDRIVESWITCHING_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_ODSWEN))
119 
130 #define __HAL_PWR_UNDERDRIVE_ENABLE() (PWR->CR1 |= (uint32_t)PWR_CR1_UDEN)
131 #define __HAL_PWR_UNDERDRIVE_DISABLE() (PWR->CR1 &= (uint32_t)(~PWR_CR1_UDEN))
132 
144 #define __HAL_PWR_GET_ODRUDR_FLAG(__FLAG__) ((PWR->CSR1 & (__FLAG__)) == (__FLAG__))
145 
148 #define __HAL_PWR_CLEAR_ODRUDR_FLAG() (PWR->CSR1 |= PWR_FLAG_UDRDY)
149 
160 #define __HAL_PWR_GET_WAKEUP_FLAG(__WUFLAG__) (PWR->CSR2 & (__WUFLAG__))
161 
172 #define __HAL_PWR_CLEAR_WAKEUP_FLAG(__WUFLAG__) (PWR->CR2 |= (__WUFLAG__))
173 
176 /* Exported functions --------------------------------------------------------*/
184 uint32_t HAL_PWREx_GetVoltageRange(void);
185 HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling);
186 
191 
196 
199 HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t STOPEntry);
200 
208 /* Private types -------------------------------------------------------------*/
209 /* Private variables ---------------------------------------------------------*/
210 /* Private constants ---------------------------------------------------------*/
211 /* Private macros ------------------------------------------------------------*/
219 #define IS_PWR_REGULATOR_UNDERDRIVE(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_UNDERDRIVE_ON) || \
220  ((REGULATOR) == PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON))
221 #define IS_PWR_WAKEUP_PIN(__PIN__) (((__PIN__) == PWR_WAKEUP_PIN1) || \
222  ((__PIN__) == PWR_WAKEUP_PIN2) || \
223  ((__PIN__) == PWR_WAKEUP_PIN3) || \
224  ((__PIN__) == PWR_WAKEUP_PIN4) || \
225  ((__PIN__) == PWR_WAKEUP_PIN5) || \
226  ((__PIN__) == PWR_WAKEUP_PIN6) || \
227  ((__PIN__) == PWR_WAKEUP_PIN1_HIGH) || \
228  ((__PIN__) == PWR_WAKEUP_PIN2_HIGH) || \
229  ((__PIN__) == PWR_WAKEUP_PIN3_HIGH) || \
230  ((__PIN__) == PWR_WAKEUP_PIN4_HIGH) || \
231  ((__PIN__) == PWR_WAKEUP_PIN5_HIGH) || \
232  ((__PIN__) == PWR_WAKEUP_PIN6_HIGH) || \
233  ((__PIN__) == PWR_WAKEUP_PIN1_LOW) || \
234  ((__PIN__) == PWR_WAKEUP_PIN2_LOW) || \
235  ((__PIN__) == PWR_WAKEUP_PIN3_LOW) || \
236  ((__PIN__) == PWR_WAKEUP_PIN4_LOW) || \
237  ((__PIN__) == PWR_WAKEUP_PIN5_LOW) || \
238  ((__PIN__) == PWR_WAKEUP_PIN6_LOW))
239 
255 #ifdef __cplusplus
256 }
257 #endif
258 
259 
260 #endif /* __STM32F7xx_HAL_PWR_EX_H */
261 
262 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
HAL_StatusTypeDef
HAL_StatusTypeDef
HAL Status structures definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:40
HAL_PWREx_EnableBkUpReg
HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void)
HAL_PWREx_EnableOverDrive
HAL_StatusTypeDef HAL_PWREx_EnableOverDrive(void)
HAL_PWREx_EnableLowRegulatorLowVoltage
void HAL_PWREx_EnableLowRegulatorLowVoltage(void)
HAL_PWREx_DisableBkUpReg
HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void)
HAL_PWREx_DisableOverDrive
HAL_StatusTypeDef HAL_PWREx_DisableOverDrive(void)
HAL_PWREx_EnterUnderDriveSTOPMode
HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
HAL_PWREx_EnableFlashPowerDown
void HAL_PWREx_EnableFlashPowerDown(void)
HAL_PWREx_DisableFlashPowerDown
void HAL_PWREx_DisableFlashPowerDown(void)
HAL_PWREx_DisableMainRegulatorLowVoltage
void HAL_PWREx_DisableMainRegulatorLowVoltage(void)
stm32f7xx_hal_def.h
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_PWREx_GetVoltageRange
uint32_t HAL_PWREx_GetVoltageRange(void)
HAL_PWREx_DisableLowRegulatorLowVoltage
void HAL_PWREx_DisableLowRegulatorLowVoltage(void)
HAL_PWREx_EnableMainRegulatorLowVoltage
void HAL_PWREx_EnableMainRegulatorLowVoltage(void)
HAL_PWREx_ControlVoltageScaling
HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling)


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53