My Project
Loading...
Searching...
No Matches
PWR Exported Macro

Macros

#define __HAL_PWR_GET_FLAG(__FLAG__)   ((PWR->CSR & (__FLAG__)) == (__FLAG__))
 Check PWR flag is set or not.
 
#define __HAL_PWR_CLEAR_FLAG(__FLAG__)   (PWR->CR |= (__FLAG__) << 2U)
 Clear the PWR's pending flags.
 

Detailed Description

Macro Definition Documentation

◆ __HAL_PWR_CLEAR_FLAG

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

Clear the PWR's pending flags.

Parameters
__FLAG__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_GET_FLAG

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

Check PWR flag is set or not.

Parameters
__FLAG__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_VREFINTRDY: This flag indicates that the internal reference voltage VREFINT is ready.
Return values
Thenew state of FLAG (TRUE or FALSE).