Prusa MINI Firmware overview
|
Go to the documentation of this file.
37 #ifndef __STM32F4xx_HAL_PWR_H
38 #define __STM32F4xx_HAL_PWR_H
85 #define PWR_WAKEUP_PIN1 0x00000100U
93 #define PWR_PVDLEVEL_0 PWR_CR_PLS_LEV0
94 #define PWR_PVDLEVEL_1 PWR_CR_PLS_LEV1
95 #define PWR_PVDLEVEL_2 PWR_CR_PLS_LEV2
96 #define PWR_PVDLEVEL_3 PWR_CR_PLS_LEV3
97 #define PWR_PVDLEVEL_4 PWR_CR_PLS_LEV4
98 #define PWR_PVDLEVEL_5 PWR_CR_PLS_LEV5
99 #define PWR_PVDLEVEL_6 PWR_CR_PLS_LEV6
100 #define PWR_PVDLEVEL_7 PWR_CR_PLS_LEV7
109 #define PWR_PVD_MODE_NORMAL 0x00000000U
110 #define PWR_PVD_MODE_IT_RISING 0x00010001U
111 #define PWR_PVD_MODE_IT_FALLING 0x00010002U
112 #define PWR_PVD_MODE_IT_RISING_FALLING 0x00010003U
113 #define PWR_PVD_MODE_EVENT_RISING 0x00020001U
114 #define PWR_PVD_MODE_EVENT_FALLING 0x00020002U
115 #define PWR_PVD_MODE_EVENT_RISING_FALLING 0x00020003U
124 #define PWR_MAINREGULATOR_ON 0x00000000U
125 #define PWR_LOWPOWERREGULATOR_ON PWR_CR_LPDS
133 #define PWR_SLEEPENTRY_WFI ((uint8_t)0x01)
134 #define PWR_SLEEPENTRY_WFE ((uint8_t)0x02)
142 #define PWR_STOPENTRY_WFI ((uint8_t)0x01)
143 #define PWR_STOPENTRY_WFE ((uint8_t)0x02)
151 #define PWR_FLAG_WU PWR_CSR_WUF
152 #define PWR_FLAG_SB PWR_CSR_SBF
153 #define PWR_FLAG_PVDO PWR_CSR_PVDO
154 #define PWR_FLAG_BRR PWR_CSR_BRR
155 #define PWR_FLAG_VOSRDY PWR_CSR_VOSRDY
190 #define __HAL_PWR_GET_FLAG(__FLAG__) ((PWR->CSR & (__FLAG__)) == (__FLAG__))
198 #define __HAL_PWR_CLEAR_FLAG(__FLAG__) (PWR->CR |= (__FLAG__) << 2U)
204 #define __HAL_PWR_PVD_EXTI_ENABLE_IT() (EXTI->IMR |= (PWR_EXTI_LINE_PVD))
210 #define __HAL_PWR_PVD_EXTI_DISABLE_IT() (EXTI->IMR &= ~(PWR_EXTI_LINE_PVD))
216 #define __HAL_PWR_PVD_EXTI_ENABLE_EVENT() (EXTI->EMR |= (PWR_EXTI_LINE_PVD))
222 #define __HAL_PWR_PVD_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~(PWR_EXTI_LINE_PVD))
228 #define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)
234 #define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)
240 #define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)
247 #define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)
254 #define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE() do{__HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE();\
255 __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE();\
263 #define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE() do{__HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE();\
264 __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE();\
271 #define __HAL_PWR_PVD_EXTI_GET_FLAG() (EXTI->PR & (PWR_EXTI_LINE_PVD))
277 #define __HAL_PWR_PVD_EXTI_CLEAR_FLAG() (EXTI->PR = (PWR_EXTI_LINE_PVD))
283 #define __HAL_PWR_PVD_EXTI_GENERATE_SWIT() (EXTI->SWIER |= (PWR_EXTI_LINE_PVD))
353 #define PWR_EXTI_LINE_PVD ((uint32_t)EXTI_IMR_MR16)
362 #define PWR_OFFSET (PWR_BASE - PERIPH_BASE)
363 #define PWR_CR_OFFSET 0x00U
364 #define PWR_CSR_OFFSET 0x04U
365 #define PWR_CR_OFFSET_BB (PWR_OFFSET + PWR_CR_OFFSET)
366 #define PWR_CSR_OFFSET_BB (PWR_OFFSET + PWR_CSR_OFFSET)
376 #define DBP_BIT_NUMBER PWR_CR_DBP_Pos
377 #define CR_DBP_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (DBP_BIT_NUMBER * 4U))
380 #define PVDE_BIT_NUMBER PWR_CR_PVDE_Pos
381 #define CR_PVDE_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (PVDE_BIT_NUMBER * 4U))
384 #define VOS_BIT_NUMBER PWR_CR_VOS_Pos
385 #define CR_VOS_BB (uint32_t)(PERIPH_BB_BASE + (PWR_CR_OFFSET_BB * 32U) + (VOS_BIT_NUMBER * 4U))
395 #define EWUP_BIT_NUMBER PWR_CSR_EWUP_Pos
396 #define CSR_EWUP_BB (PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB * 32U) + (EWUP_BIT_NUMBER * 4U))
412 #define IS_PWR_PVD_LEVEL(LEVEL) (((LEVEL) == PWR_PVDLEVEL_0) || ((LEVEL) == PWR_PVDLEVEL_1)|| \
413 ((LEVEL) == PWR_PVDLEVEL_2) || ((LEVEL) == PWR_PVDLEVEL_3)|| \
414 ((LEVEL) == PWR_PVDLEVEL_4) || ((LEVEL) == PWR_PVDLEVEL_5)|| \
415 ((LEVEL) == PWR_PVDLEVEL_6) || ((LEVEL) == PWR_PVDLEVEL_7))
416 #define IS_PWR_PVD_MODE(MODE) (((MODE) == PWR_PVD_MODE_IT_RISING)|| ((MODE) == PWR_PVD_MODE_IT_FALLING) || \
417 ((MODE) == PWR_PVD_MODE_IT_RISING_FALLING) || ((MODE) == PWR_PVD_MODE_EVENT_RISING) || \
418 ((MODE) == PWR_PVD_MODE_EVENT_FALLING) || ((MODE) == PWR_PVD_MODE_EVENT_RISING_FALLING) || \
419 ((MODE) == PWR_PVD_MODE_NORMAL))
420 #define IS_PWR_REGULATOR(REGULATOR) (((REGULATOR) == PWR_MAINREGULATOR_ON) || \
421 ((REGULATOR) == PWR_LOWPOWERREGULATOR_ON))
422 #define IS_PWR_SLEEP_ENTRY(ENTRY) (((ENTRY) == PWR_SLEEPENTRY_WFI) || ((ENTRY) == PWR_SLEEPENTRY_WFE))
423 #define IS_PWR_STOP_ENTRY(ENTRY) (((ENTRY) == PWR_STOPENTRY_WFI) || ((ENTRY) == PWR_STOPENTRY_WFE))
void HAL_PWR_EnableBkUpAccess(void)
This file contains HAL common defines, enumeration, macros and structures definitions.
PWR PVD configuration structure definition.
Definition: stm32f4xx_hal_pwr.h:64
void HAL_PWR_DisablePVD(void)
void HAL_PWR_DisableBkUpAccess(void)
void HAL_PWR_EnablePVD(void)
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinx)
uint32_t PVDLevel
Definition: stm32f4xx_hal_pwr.h:66
void HAL_PWR_ConfigPVD(PWR_PVDTypeDef *sConfigPVD)
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
const uint8_t[]
Definition: 404_html.c:3
void HAL_PWR_EnterSTOPMode(uint32_t Regulator, uint8_t STOPEntry)
uint32_t Mode
Definition: stm32f4xx_hal_pwr.h:69
void HAL_PWR_EnableSEVOnPend(void)
Header file of PWR HAL Extension module.
void HAL_PWR_EnableSleepOnExit(void)
void HAL_PWR_DeInit(void)
void HAL_PWR_DisableSleepOnExit(void)
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
void HAL_PWR_DisableSEVOnPend(void)
void HAL_PWR_PVDCallback(void)
void HAL_PWR_EnterSTANDBYMode(void)
void HAL_PWR_PVD_IRQHandler(void)