Classes | Macros | Typedefs | Enumerations | Variables
Typedefs
SYSTEM » Power Manager

## Classes
struct | pwr_mgmt_var_box_t
| power manager setting parameter. Use pwr_mgmt_var_set to transfer the parameters in the structure to PMU, and then the pwr_mgmt_mode_set function will use the new parameters for power management. Note that this is an advanced API, the wrong setting of parameters may lead to abnormal power management, so please use it carefully. More...
struct | pwr_table_t
| parameter configuration table. More...

## Macros
#define | PMR_MGMT_SUCCESS 0x0
| PMU error code. More...
#define | PMR_MGMT_FAIL 0xFF
#define | PWR_MGMT_BB_CHECK_FAIL 0xFE
#define | PWR_MGMT_MODE_CHECK_FAIL 0xFD

## Typedefs
typedef void(* | trace_func_t) (uint8_t)
| Trace function type. More...
typedef void(* | periph_func_t) (void)
| Peripheral function type. More...
typedef void(* | pwr_before_sleep_func_t) (void)
| Before sleep function type. More...
typedef pwr_mgmt_dev_state_t(* | pwr_dev_check_func_t) (void)
| Device check function type. More...
typedef void(* | mem_check_proc_t) (void)
| mem check process type. More...
typedef uint8_t(* | srpg_before_func_t) (void)
| SRPG before function type. More...

## Enumerations
enum | boot_mode_t { COLD_BOOT = 0, WARM_BOOT }
| power manager boot type. More...
enum | pwr_mgmt_mode_t { PMR_MGMT_ACTIVE_MODE = 0x0, PMR_MGMT_IDLE_MODE, PMR_MGMT_SLEEP_MODE }
| power manager model. More...
enum | app_prevent_sleep { PMR_WAKE_UP_ONGOING = 0x0001, PMR_TL_TX_ONGOING = 0x0002, PMR_TL_RX_ONGOING = 0x0004, PMR_DEEP_SLEEP = 0x0008, PMR_CRYPT_ONGOING = 0x0010, PMR_CSB_NOT_LPO_ALLOWED = 0x0040, PMR_MWS_WLAN_EVENT_GENERATOR_ACTIVE = 0x0080, PMR_PLF_DEEP_SLEEP_DISABLED = 0x0100, PMR_BB_FRAME_ONGOING = 0x0200, PMR_HOP_CALC_ONGOING = 0x0400, PMR_BT_ACTIVE_MODE = 0x0800, PMR_BLE_ACTIVE_MODE = 0x1000 }
| Definition of the bits preventing the system from sleeping. More...
enum | pwr_mgmt_dev_state_t { DEVICE_BUSY = 0x0, DEVICE_IDLE }
| power manager device work state. More...
enum | notify_timer_event_t { EVENT_APP_TIMER_START = 0, EVENT_APP_TIMER_STOP }
| power manager app timer work state. More...
enum | { BLE_GATT_COMMON_EVT_MTU_EXCHANGE = BLE_GATT_COMMON_EVT_BASE, BLE_GATT_COMMON_EVT_PRF_REGISTER, BLE_GATT_COMMON_EVT_MAX, AMS_PLAYER_ATTR_ID_NAME, AMS_PLAYER_ATTR_ID_PLAYBACK_INFO, AMS_PLAYER_ATTR_ID_VOLUME, IAS_ALERT_NONE, IAS_ALERT_MILD, IAS_ALERT_HIGH, EXFLASH_CONFIG_CACHE_MODE = 0x00, EXFLASH_CONFIG_READ_CMD = 0x01, EXFLASH_CONFIG_BAUD_RATE = 0x02, EXFLASH_CONFIG_CLOCK_MODE = 0x03, EXFLASH_CONFIG_CACHE_FLUSH = 0x04, EXFLASH_CONFIG_PAGE_TYPE = 0x05, LL_PWM_FLICKER_MODE = 0x00, LL_PWM_BREATH_MODE, LL_PWM_CODING_MODE, DFU_CACHE_TYPE_CALL_STACK = 0x00, DFU_CACHE_TYPE_REG, TRC_PWR_WFE_MODE = 0, TRC_PWR_DSLEEP_MODE, TRC_PWR_ACTIVE_MODE, TRC_PWR_BLE_RET_DSLEEP, TRC_PWR_APP_TIMER_REFUSE, TRC_PWR_APP_TIMER_PASS, TRC_PWR_BLE_TIMER_REFUSE, TRC_PWR_BLE_TIMER_PASS, TRC_PWR_RTC_TIMER_REFUSE, TRC_PWR_RTC_TIMER_PASS, TRC_PWR_RTC1_TIMER_REFUSE, TRC_PWR_RTC1_TIMER_PASS, TRC_PWR_WDT_TIMER_REFUSE, TRC_PWR_WDT_TIMER_PASS }
| PMU Tracking. More...

## Variables
pwr_table_t | pwr_table []
| pwr table. More...

## Detailed Description

## Macro Definition Documentation

## ◆ PMR_MGMT_FAIL

#define PMR_MGMT_FAIL 0xFF

Definition at line 66 of file gr5405_pwr.h.

## ◆ PMR_MGMT_SUCCESS

#define PMR_MGMT_SUCCESS 0x0

PMU error code.

Definition at line 65 of file gr5405_pwr.h.

## ◆ PWR_MGMT_BB_CHECK_FAIL

#define PWR_MGMT_BB_CHECK_FAIL 0xFE

Definition at line 67 of file gr5405_pwr.h.

## ◆ PWR_MGMT_MODE_CHECK_FAIL

#define PWR_MGMT_MODE_CHECK_FAIL 0xFD

Definition at line 68 of file gr5405_pwr.h.

## Typedef Documentation

## ◆ mem_check_proc_t

typedef void(* mem_check_proc_t) (void)

mem check process type.

Definition at line 187 of file gr5405_pwr.h.

## ◆ periph_func_t

typedef void(* periph_func_t) (void)

Peripheral function type.

Definition at line 178 of file gr5405_pwr.h.

## ◆ pwr_before_sleep_func_t

typedef void(* pwr_before_sleep_func_t) (void)

Before sleep function type.

Definition at line 181 of file gr5405_pwr.h.

## ◆ pwr_dev_check_func_t

typedef pwr_mgmt_dev_state_t(* pwr_dev_check_func_t) (void)

Device check function type.

Definition at line 184 of file gr5405_pwr.h.

## ◆ srpg_before_func_t

typedef uint8_t(* srpg_before_func_t) (void)

SRPG before function type.

Definition at line 190 of file gr5405_pwr.h.

## ◆ trace_func_t

typedef void(* trace_func_t) (uint8_t)

Trace function type.

Definition at line 175 of file gr5405_pwr.h.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

PMU Tracking.

Enumerator
BLE_GATT_COMMON_EVT_MTU_EXCHANGE | MTU Exchange event.
BLE_GATT_COMMON_EVT_PRF_REGISTER | Service Register event.
BLE_GATT_COMMON_EVT_MAX |
AMS_PLAYER_ATTR_ID_NAME | Player attribute index of name.
AMS_PLAYER_ATTR_ID_PLAYBACK_INFO | Player attribute index of playback information.
AMS_PLAYER_ATTR_ID_VOLUME | Player attribute index of volume.
IAS_ALERT_NONE | No alert.
IAS_ALERT_MILD | Mild alert.
IAS_ALERT_HIGH | High alert.
EXFLASH_CONFIG_CACHE_MODE |
EXFLASH_CONFIG_READ_CMD |
EXFLASH_CONFIG_BAUD_RATE |
EXFLASH_CONFIG_CLOCK_MODE |
EXFLASH_CONFIG_CACHE_FLUSH |
EXFLASH_CONFIG_PAGE_TYPE |
LL_PWM_FLICKER_MODE | Choose PWM Flicker Mode
LL_PWM_BREATH_MODE | Choose PWM Breath Mode
LL_PWM_CODING_MODE | Choose PWM Coding Mode
DFU_CACHE_TYPE_CALL_STACK | call stack buffer.
DFU_CACHE_TYPE_REG | register buffer.
TRC_PWR_WFE_MODE | WFE mode.
TRC_PWR_DSLEEP_MODE | Deep sleep mode.
TRC_PWR_ACTIVE_MODE | Active mode.
TRC_PWR_BLE_RET_DSLEEP | BLE return deep sleep.
TRC_PWR_APP_TIMER_REFUSE | App timer refuse.
TRC_PWR_APP_TIMER_PASS | App timer pass.
TRC_PWR_BLE_TIMER_REFUSE | BLE timer refuse.
TRC_PWR_BLE_TIMER_PASS | BLE timer pass.
TRC_PWR_RTC_TIMER_REFUSE | RTC timer refuse.
TRC_PWR_RTC_TIMER_PASS | RTC timer pass.
TRC_PWR_RTC1_TIMER_REFUSE | RTC timer refuse.
TRC_PWR_RTC1_TIMER_PASS | RTC timer pass.
TRC_PWR_WDT_TIMER_REFUSE | AON WDT timer refuse.
TRC_PWR_WDT_TIMER_PASS | AON WDT timer pass.

Definition at line 145 of file gr5405_pwr.h.

## ◆ app_prevent_sleep

enum app_prevent_sleep

Definition of the bits preventing the system from sleeping.

Enumerator
PMR_WAKE_UP_ONGOING | Flag indicating that the wake up process is ongoing.
PMR_TL_TX_ONGOING | Flag indicating that an TX transfer is ongoing on Transport Layer.
PMR_TL_RX_ONGOING | Flag indicating that an RX transfer is ongoing on Transport Layer.
PMR_DEEP_SLEEP | Flag indicating the IP is in sleep, to avoid running sleep algorithm while already entering sleep.
PMR_CRYPT_ONGOING | Flag indicating that an encryption is ongoing.
PMR_CSB_NOT_LPO_ALLOWED | Flag indicating that controller shall not sleep due to not CSB LPO_Allowed.
PMR_MWS_WLAN_EVENT_GENERATOR_ACTIVE | Flag indicating the MWS/WLAN Event Generator is in operation.
PMR_PLF_DEEP_SLEEP_DISABLED | Flag to indicate that platform does not support deep sleep.
PMR_BB_FRAME_ONGOING | Flag to indicate that a baseband frame is ongoing.
PMR_HOP_CALC_ONGOING | Flag to indicate that BLE Hopping computation on-going.
PMR_BT_ACTIVE_MODE | Flag to indicate that BT is in active mode (ACL, SCO)
PMR_BLE_ACTIVE_MODE | Flag to indicate that BLE requires active mode.

Definition at line 102 of file gr5405_pwr.h.

## ◆ boot_mode_t

enum boot_mode_t

power manager boot type.

Enumerator
COLD_BOOT | Cold boot state.
WARM_BOOT | Warm boot state.

Definition at line 87 of file gr5405_pwr.h.

## ◆ notify_timer_event_t

enum notify_timer_event_t

power manager app timer work state.

Enumerator
EVENT_APP_TIMER_START | App-timer start state.
EVENT_APP_TIMER_STOP | App-timer stop state.

Definition at line 138 of file gr5405_pwr.h.

## ◆ pwr_mgmt_dev_state_t

enum pwr_mgmt_dev_state_t

power manager device work state.

Enumerator
DEVICE_BUSY | Device busy state.
DEVICE_IDLE | Device idle state.

Definition at line 131 of file gr5405_pwr.h.

## ◆ pwr_mgmt_mode_t

enum pwr_mgmt_mode_t

power manager model.

Enumerator
PMR_MGMT_ACTIVE_MODE | Full speed state.
PMR_MGMT_IDLE_MODE | Idle state.
PMR_MGMT_SLEEP_MODE | Deep sleep state.

Definition at line 94 of file gr5405_pwr.h.

## Variable Documentation

## ◆ pwr_table

pwr_table_t pwr_table[]
| extern

pwr table.