Prusa MINI Firmware overview
PWR Exported Macro
Collaboration diagram for PWR Exported Macro:

Macros

#define __HAL_PWR_GET_FLAG(__FLAG__)   ((PWR->CSR & (__FLAG__)) == (__FLAG__))
 Check PWR flag is set or not. More...
 
#define __HAL_PWR_CLEAR_FLAG(__FLAG__)   (PWR->CR |= (__FLAG__) << 2U)
 Clear the PWR's pending flags. More...
 
#define __HAL_PWR_PVD_EXTI_ENABLE_IT()   (EXTI->IMR |= (PWR_EXTI_LINE_PVD))
 Enable the PVD Exti Line 16. More...
 
#define __HAL_PWR_PVD_EXTI_DISABLE_IT()   (EXTI->IMR &= ~(PWR_EXTI_LINE_PVD))
 Disable the PVD EXTI Line 16. More...
 
#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT()   (EXTI->EMR |= (PWR_EXTI_LINE_PVD))
 Enable event on PVD Exti Line 16. More...
 
#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT()   (EXTI->EMR &= ~(PWR_EXTI_LINE_PVD))
 Disable event on PVD Exti Line 16. More...
 
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE()   SET_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)
 Enable the PVD Extended Interrupt Rising Trigger. More...
 
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE()   CLEAR_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)
 Disable the PVD Extended Interrupt Rising Trigger. More...
 
#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE()   SET_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)
 Enable the PVD Extended Interrupt Falling Trigger. More...
 
#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE()   CLEAR_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)
 Disable the PVD Extended Interrupt Falling Trigger. More...
 
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE()
 PVD EXTI line configuration: set rising & falling edge trigger. More...
 
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE()
 Disable the PVD Extended Interrupt Rising & Falling Trigger. This parameter can be: More...
 
#define __HAL_PWR_PVD_EXTI_GET_FLAG()   (EXTI->PR & (PWR_EXTI_LINE_PVD))
 checks whether the specified PVD Exti interrupt flag is set or not. More...
 
#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG()   (EXTI->PR = (PWR_EXTI_LINE_PVD))
 Clear the PVD Exti flag. More...
 
#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT()   (EXTI->SWIER |= (PWR_EXTI_LINE_PVD))
 Generates a Software interrupt on PVD EXTI line. More...
 

Detailed Description

Macro Definition Documentation

◆ __HAL_PWR_GET_FLAG

#define __HAL_PWR_GET_FLAG (   __FLAG__)    ((PWR->CSR & (__FLAG__)) == (__FLAG__))

Check PWR flag is set or not.

Parameters
<strong>FLAG</strong>specifies the flag to check. This parameter can be one of the following values:
  • PWR_FLAG_WU: Wake Up flag. This flag indicates that a wakeup event was received from the WKUP pin or from the RTC alarm (Alarm A or Alarm B), RTC Tamper event, RTC TimeStamp event or RTC Wakeup. An additional wakeup event is detected if the WKUP pin is enabled (by setting the EWUP bit) when the WKUP pin level is already high.
  • PWR_FLAG_SB: StandBy flag. This flag indicates that the system was resumed from StandBy mode.
  • PWR_FLAG_PVDO: PVD Output. This flag is valid only if PVD is enabled by the HAL_PWR_EnablePVD() function. The PVD is stopped by Standby mode For this reason, this bit is equal to 0 after Standby or reset until the PVDE bit is set.
  • PWR_FLAG_BRR: Backup regulator ready flag. This bit is not reset when the device wakes up from Standby mode or by a system reset or power reset.
  • PWR_FLAG_VOSRDY: This flag indicates that the Regulator voltage scaling output selection is ready.
Return values
Thenew state of FLAG (TRUE or FALSE).

◆ __HAL_PWR_CLEAR_FLAG

#define __HAL_PWR_CLEAR_FLAG (   __FLAG__)    (PWR->CR |= (__FLAG__) << 2U)

Clear the PWR's pending flags.

Parameters
<strong>FLAG</strong>specifies the flag to clear. This parameter can be one of the following values:
  • PWR_FLAG_WU: Wake Up flag
  • PWR_FLAG_SB: StandBy flag

◆ __HAL_PWR_PVD_EXTI_ENABLE_IT

#define __HAL_PWR_PVD_EXTI_ENABLE_IT ( )    (EXTI->IMR |= (PWR_EXTI_LINE_PVD))

Enable the PVD Exti Line 16.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_DISABLE_IT

#define __HAL_PWR_PVD_EXTI_DISABLE_IT ( )    (EXTI->IMR &= ~(PWR_EXTI_LINE_PVD))

Disable the PVD EXTI Line 16.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_ENABLE_EVENT

#define __HAL_PWR_PVD_EXTI_ENABLE_EVENT ( )    (EXTI->EMR |= (PWR_EXTI_LINE_PVD))

Enable event on PVD Exti Line 16.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_DISABLE_EVENT

#define __HAL_PWR_PVD_EXTI_DISABLE_EVENT ( )    (EXTI->EMR &= ~(PWR_EXTI_LINE_PVD))

Disable event on PVD Exti Line 16.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE

#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE ( )    SET_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)

Enable the PVD Extended Interrupt Rising Trigger.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE

#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE ( )    CLEAR_BIT(EXTI->RTSR, PWR_EXTI_LINE_PVD)

Disable the PVD Extended Interrupt Rising Trigger.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE

#define __HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE ( )    SET_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)

Enable the PVD Extended Interrupt Falling Trigger.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE

#define __HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE ( )    CLEAR_BIT(EXTI->FTSR, PWR_EXTI_LINE_PVD)

Disable the PVD Extended Interrupt Falling Trigger.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE

#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_FALLING_EDGE ( )
Value:
__HAL_PWR_PVD_EXTI_ENABLE_FALLING_EDGE();\
}while(0U)

PVD EXTI line configuration: set rising & falling edge trigger.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE

#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_FALLING_EDGE ( )
Value:
__HAL_PWR_PVD_EXTI_DISABLE_FALLING_EDGE();\
}while(0U)

Disable the PVD Extended Interrupt Rising & Falling Trigger. This parameter can be:

Return values
None.

◆ __HAL_PWR_PVD_EXTI_GET_FLAG

#define __HAL_PWR_PVD_EXTI_GET_FLAG ( )    (EXTI->PR & (PWR_EXTI_LINE_PVD))

checks whether the specified PVD Exti interrupt flag is set or not.

Return values
EXTIPVD Line Status.

◆ __HAL_PWR_PVD_EXTI_CLEAR_FLAG

#define __HAL_PWR_PVD_EXTI_CLEAR_FLAG ( )    (EXTI->PR = (PWR_EXTI_LINE_PVD))

Clear the PVD Exti flag.

Return values
None.

◆ __HAL_PWR_PVD_EXTI_GENERATE_SWIT

#define __HAL_PWR_PVD_EXTI_GENERATE_SWIT ( )    (EXTI->SWIER |= (PWR_EXTI_LINE_PVD))

Generates a Software interrupt on PVD EXTI line.

Return values
None
__HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE
#define __HAL_PWR_PVD_EXTI_ENABLE_RISING_EDGE()
Enable the PVD Extended Interrupt Rising Trigger.
Definition: stm32f4xx_hal_pwr.h:228
__HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE
#define __HAL_PWR_PVD_EXTI_DISABLE_RISING_EDGE()
Disable the PVD Extended Interrupt Rising Trigger.
Definition: stm32f4xx_hal_pwr.h:234