Macros
PWR Private Macros
Peripheral Driver » HAL Driver » PWR » Defines

## Macros
#define | IS_PWR_WAKEUP_CONDITION(__COND__)
| Check if PWR wakeup condition is valid. More...
#define | IS_PWR_EXT_WAKEUP_PIN(__PIN__)
| Check if PWR external wakeup pin is valid. More...
#define | IS_PWR_SLP_TIMER_MODE(__MODE__)
| Check if PWR sleep timer mode is valid. More...
#define | IS_PWR_EXTWKUP_TYPE(__TYPE__)
| Check if PWR external wakeup type is valid. More...
#define | IS_PWR_MEM_BLOCK(__BLOCK__)
| Check if PWR memory block is valid. More...
#define | IS_PWR_MEM_POWER_STAT(__STATE__)
| Check if PWR memory power state is valid. More...
#define | IS_PWR_COMM_TIMER_POWER_STAT(__STATE__)
| Check if PWR BLE communication timer power state is valid. More...
#define | IS_PWR_COMM_CORE_POWER_STAT(__STATE__)
| Check if PWR BLE communication core power state is valid. More...
#define | IS_PWR_COMM_TIMER_MODE(__MODE__)
| Check if PWR BLE communication timer mode is valid. More...
#define | IS_PWR_COMM_CORE_MODE(__MODE__)
| Check if PWR BLE communication core mode is valid. More...
#define | IS_PWR_PWR_TIMER_TYPE(__TYPE__)
| Check if PWR sleep timer type is valid. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_PWR_COMM_CORE_MODE

#define IS_PWR_COMM_CORE_MODE | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == PWR_COMM_CORE_MODE_RESET) || \
((__MODE__) == PWR_COMM_CORE_MODE_RUNNING))

Check if PWR BLE communication core mode is valid.

Parameters

  <strong>MODE</strong> | PWR BLE communication core mode.

Return values

  SET | (MODE is valid) or RESET (MODE is invalid)

## ◆ IS_PWR_COMM_CORE_POWER_STAT

#define IS_PWR_COMM_CORE_POWER_STAT | ( |  | __STATE__ | ) |

Value:
(((__STATE__) == PWR_COMM_CORE_POWER_DOWN) || \
((__STATE__) == PWR_COMM_CORE_POWER_UP))

Check if PWR BLE communication core power state is valid.

Parameters

  <strong>STATE</strong> | PWR BLE communication core power state.

Return values

  SET | (STATE is valid) or RESET (STATE is invalid)

## ◆ IS_PWR_COMM_TIMER_MODE

#define IS_PWR_COMM_TIMER_MODE | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == PWR_COMM_TIMER_MODE_RESET) || \
((__MODE__) == PWR_COMM_TIMER_MODE_RUNNING))

Check if PWR BLE communication timer mode is valid.

Parameters

  <strong>MODE</strong> | PWR BLE communication timer mode.

Return values

  SET | (MODE is valid) or RESET (MODE is invalid)

## ◆ IS_PWR_COMM_TIMER_POWER_STAT

#define IS_PWR_COMM_TIMER_POWER_STAT | ( |  | __STATE__ | ) |

Value:
(((__STATE__) == PWR_COMM_TIMER_POWER_DOWN) || \
((__STATE__) == PWR_COMM_TIMER_POWER_UP))

Check if PWR BLE communication timer power state is valid.

Parameters

  <strong>STATE</strong> | PWR BLE communication timer power state.

Return values

  SET | (STATE is valid) or RESET (STATE is invalid)

## ◆ IS_PWR_EXT_WAKEUP_PIN

#define IS_PWR_EXT_WAKEUP_PIN | ( |  | __PIN__ | ) |

Value:
((((__PIN__) & PWR_EXTWKUP_PIN_ALL) != 0x00U) &&\
(((__PIN__) & ~PWR_EXTWKUP_PIN_ALL) == 0x00U))

Check if PWR external wakeup pin is valid.

Parameters

  <strong>PIN</strong> | PWR external wakeup pin.

Return values

  SET | (PIN is valid) or RESET (PIN is invalid)

## ◆ IS_PWR_EXTWKUP_TYPE

#define IS_PWR_EXTWKUP_TYPE | ( |  | __TYPE__ | ) |

Value:
(((__TYPE__) == PWR_EXTWKUP_TYPE_LOW) || \
((__TYPE__) == PWR_EXTWKUP_TYPE_HIGH) || \
((__TYPE__) == PWR_EXTWKUP_TYPE_RISING) || \
((__TYPE__) == PWR_EXTWKUP_TYPE_FALLING))

Check if PWR external wakeup type is valid.

Parameters

  <strong>TYPE</strong> | PWR external wakeup type.

Return values

  SET | (TYPE is valid) or RESET (TYPE is invalid)

## ◆ IS_PWR_MEM_BLOCK

#define IS_PWR_MEM_BLOCK | ( |  | __BLOCK__ | ) |

Value:
((((__BLOCK__) & PWR_MEM_ALL) != 0x00U) &&\
(((__BLOCK__) & ~PWR_MEM_ALL) == 0x00U))

Check if PWR memory block is valid.

Parameters

  <strong>BLOCK</strong> | PWR memory block.

Return values

  SET | (BLOCK is valid) or RESET (BLOCK is invalid)

## ◆ IS_PWR_MEM_POWER_STAT

#define IS_PWR_MEM_POWER_STAT | ( |  | __STATE__ | ) |

Value:
(((__STATE__) == PWR_MEM_POWER_OFF) || \
((__STATE__) == PWR_MEM_POWER_FULL) || \
((__STATE__) == PWR_MEM_POWER_RETENTION))

Check if PWR memory power state is valid.

Parameters

  <strong>STATE</strong> | PWR memory power state.

Return values

  SET | (STATE is valid) or RESET (STATE is invalid)

## ◆ IS_PWR_PWR_TIMER_TYPE

#define IS_PWR_PWR_TIMER_TYPE | ( |  | __TYPE__ | ) |

Value:
(((__TYPE__) == PWR_TIMER_TYPE_CAL_TIMER) || \
((__TYPE__) == PWR_TIMER_TYPE_AON_WDT) || \
((__TYPE__) == PWR_TIMER_TYPE_SLP_TIMER) || \
((__TYPE__) == PWR_TIMER_TYPE_CAL_ALARM))

Check if PWR sleep timer type is valid.

Parameters

  <strong>TYPE</strong> | PWR sleep timer type.

Return values

  SET | (TYPE is valid) or RESET (TYPE is invalid)

## ◆ IS_PWR_SLP_TIMER_MODE

#define IS_PWR_SLP_TIMER_MODE | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == PWR_SLP_TIMER_MODE_NORMAL) || \
((__MODE__) == PWR_SLP_TIMER_MODE_SINGLE) || \
((__MODE__) == PWR_SLP_TIMER_MODE_RELOAD) || \
((__MODE__) == PWR_SLP_TIMER_MODE_DISABLE))

Check if PWR sleep timer mode is valid.

Parameters

  <strong>MODE</strong> | PWR sleep timer mode.

Return values

  SET | (MODE is valid) or RESET (MODE is invalid)

## ◆ IS_PWR_WAKEUP_CONDITION

#define IS_PWR_WAKEUP_CONDITION | ( |  | __COND__ | ) |

Value:
((((__COND__) & PWR_WKUP_COND_ALL) != 0x00U) &&\
(((__COND__) & ~PWR_WKUP_COND_ALL) == 0x00U))

Check if PWR wakeup condition is valid.

Parameters

  <strong>COND</strong> | PWR wakeup condition.

Return values

  SET | (COND is valid) or RESET (COND is invalid)

PWR_WKUP_COND_ALL
#define PWR_WKUP_COND_ALL
Definition: gr55xx_hal_pwr.h:131
PWR_EXTWKUP_TYPE_FALLING
#define PWR_EXTWKUP_TYPE_FALLING
Definition: gr55xx_hal_pwr.h:141
PWR_TIMER_TYPE_CAL_TIMER
#define PWR_TIMER_TYPE_CAL_TIMER
Definition: gr55xx_hal_pwr.h:157
PWR_EXTWKUP_TYPE_HIGH
#define PWR_EXTWKUP_TYPE_HIGH
Definition: gr55xx_hal_pwr.h:139
PWR_EXTWKUP_TYPE_LOW
#define PWR_EXTWKUP_TYPE_LOW
Definition: gr55xx_hal_pwr.h:138
PWR_MEM_POWER_FULL
#define PWR_MEM_POWER_FULL
Definition: gr55xx_hal_pwr.h:168
PWR_COMM_TIMER_POWER_UP
#define PWR_COMM_TIMER_POWER_UP
Definition: gr55xx_hal_pwr.h:176
PWR_SLP_TIMER_MODE_RELOAD
#define PWR_SLP_TIMER_MODE_RELOAD
Definition: gr55xx_hal_pwr.h:149
PWR_COMM_CORE_MODE_RESET
#define PWR_COMM_CORE_MODE_RESET
Definition: gr55xx_hal_pwr.h:186
PWR_SLP_TIMER_MODE_NORMAL
#define PWR_SLP_TIMER_MODE_NORMAL
Definition: gr55xx_hal_pwr.h:147
PWR_TIMER_TYPE_SLP_TIMER
#define PWR_TIMER_TYPE_SLP_TIMER
Definition: gr55xx_hal_pwr.h:159
PWR_TIMER_TYPE_AON_WDT
#define PWR_TIMER_TYPE_AON_WDT
Definition: gr55xx_hal_pwr.h:158
PWR_COMM_TIMER_POWER_DOWN
#define PWR_COMM_TIMER_POWER_DOWN
Definition: gr55xx_hal_pwr.h:175
PWR_COMM_TIMER_MODE_RUNNING
#define PWR_COMM_TIMER_MODE_RUNNING
Definition: gr55xx_hal_pwr.h:185
PWR_EXTWKUP_PIN_ALL
#define PWR_EXTWKUP_PIN_ALL
Definition: gr55xx_hal_pwr.h:119
PWR_COMM_CORE_MODE_RUNNING
#define PWR_COMM_CORE_MODE_RUNNING
Definition: gr55xx_hal_pwr.h:187
PWR_COMM_TIMER_MODE_RESET
#define PWR_COMM_TIMER_MODE_RESET
Definition: gr55xx_hal_pwr.h:184
PWR_MEM_POWER_RETENTION
#define PWR_MEM_POWER_RETENTION
Definition: gr55xx_hal_pwr.h:169
PWR_COMM_CORE_POWER_DOWN
#define PWR_COMM_CORE_POWER_DOWN
Definition: gr55xx_hal_pwr.h:177
PWR_SLP_TIMER_MODE_SINGLE
#define PWR_SLP_TIMER_MODE_SINGLE
Definition: gr55xx_hal_pwr.h:148
PWR_TIMER_TYPE_CAL_ALARM
#define PWR_TIMER_TYPE_CAL_ALARM
Definition: gr55xx_hal_pwr.h:160
PWR_MEM_POWER_OFF
#define PWR_MEM_POWER_OFF
Definition: gr55xx_hal_pwr.h:167
PWR_COMM_CORE_POWER_UP
#define PWR_COMM_CORE_POWER_UP
Definition: gr55xx_hal_pwr.h:178
PWR_SLP_TIMER_MODE_DISABLE
#define PWR_SLP_TIMER_MODE_DISABLE
Definition: gr55xx_hal_pwr.h:150
PWR_EXTWKUP_TYPE_RISING
#define PWR_EXTWKUP_TYPE_RISING
Definition: gr55xx_hal_pwr.h:140