Go to the documentation of this file.
50 #ifndef __GR533X_PWR_H_
51 #define __GR533X_PWR_H_
57 #include "system_gr533x.h"
65 #define PMR_MGMT_SUCCESS 0x0
66 #define PMR_MGMT_FAIL 0xFF
67 #define PWR_MGMT_BB_CHECK_FAIL 0xFE
68 #define PWR_MGMT_MODE_CHECK_FAIL 0xFD
void(* mem_check_proc_t)(void)
mem check process type.
@ TRC_PWR_RTC1_TIMER_PASS
pwr_mgmt_mode_t pwr_mgmt_shutdown(void)
This function allows ARM to enter deep sleep mode, but users should not use this function directly....
@ TRC_PWR_APP_TIMER_REFUSE
pwr_mgmt_dev_state_t
power manager device work state.
app_prevent_sleep
Definition of the bits preventing the system from sleeping.
@ PMR_BLE_ACTIVE_MODE
Flag to indicate that BLE requires active mode.
pwr_mgmt_dev_state_t pwr_mgmt_dev_suspend(void)
Device config suspend interface.
notify_timer_event_t
power manager app timer work state.
void(* trace_func_t)(uint8_t)
Trace function type.
void pwr_mgmt_set_callback(pwr_dev_check_func_t dev_check_fun, pwr_before_sleep_func_t before_sleep_fun)
Set PMU callback function.
void pwr_mgmt_mode_set(pwr_mgmt_mode_t pm_mode)
Set the specified sleep mode. When the setting is completed, the system will automatically enter the ...
uint8_t(* srpg_before_func_t)(void)
SRPG before function type.
pwr_mgmt_mode_t
power manager model.
void pwr_mgmt_dev_init(periph_func_t p_periph_init)
Peripheral Controller Initialization Register interface.
@ PMR_DEEP_SLEEP
Flag indicating the IP is in sleep, to avoid running sleep algorithm while already entering sleep.
void pwr_mgmt_ultra_sleep(uint32_t time_ms)
Execution of this function allows ARM to enter the ultra sleep state and wakeup the chip when an even...
pwr_mgmt_dev_state_t(* pwr_dev_check_func_t)(void)
Device check function type.
@ PMR_WAKE_UP_ONGOING
Flag indicating that the wake up process is ongoing.
power manager setting parameter. Use pwr_mgmt_var_set to transfer the parameters in the structure to ...
@ PMR_HOP_CALC_ONGOING
Flag to indicate that BLE Hopping computation on-going.
parameter configuration table.
@ TRC_PWR_RTC_TIMER_REFUSE
void pwr_mgmt_set_wakeup_flag(boot_mode_t boot_mode)
Mark the mode of next boot, cold boot or warm boot.
void pwr_mgmt_init(pwr_table_t *p_pwr_table, mcu_clock_type_t sys_clk)
PMU Initialization Function.
@ PMR_CRYPT_ONGOING
Flag indicating that an encryption is ongoing.
void pwr_mgmt_schedule(void)
Sleep Policy Scheduling Function. Note that this function is only available in environments where non...
@ PMR_MWS_WLAN_EVENT_GENERATOR_ACTIVE
Flag indicating the MWS/WLAN Event Generator is in operation.
void(* pwr_before_sleep_func_t)(void)
Before sleep function type.
@ TRC_PWR_RTC1_TIMER_REFUSE
void pwr_mgmt_wfe_sleep(void)
Execution of this function allows ARM to enter the WFE state and exit the WFE state when an event or ...
@ PMR_BT_ACTIVE_MODE
Flag to indicate that BT is in active mode (ACL, SCO)
boot_mode_t
power manager boot type.
uint32_t pwr_mgmt_wdt_timer_thrd
uint32_t pwr_mgmt_rtc_timer_thrd
pwr_mgmt_mode_t pwr_mgmt_mode_get(void)
Get the specified sleep mode.
void pwr_mgmt_mem_ctl_set(uint32_t mem_sleep_state, uint32_t mem_work_state)
Mem state control under deep sleep & work state.
void pwr_mgmt_save_context(void)
Save context function.
@ PMR_BB_FRAME_ONGOING
Flag to indicate that a baseband frame is ongoing.
@ PMR_CSB_NOT_LPO_ALLOWED
Flag indicating that controller shall not sleep due to not CSB LPO_Allowed.
pwr_mgmt_mode_t pwr_mgmt_baseband_state_get(void)
Get the power state of baseband.
void pwr_mgmt_check_ble_event(void)
Check whether there are ble events in the queue, and if so, handle them immediately.
void(* periph_func_t)(void)
Peripheral function type.
pwr_table_t pwr_table[]
pwr table.
uint32_t pwr_mgmt_ble_core_thrd
@ PMR_TL_TX_ONGOING
Flag indicating that an TX transfer is ongoing on Transport Layer.
uint32_t pwr_mgmt_app_timer_thrd
uint8_t pwr_mgmt_sleep(void)
shutdown power in rtos mode
boot_mode_t pwr_mgmt_get_wakeup_flag(void)
Get the current boot mode.
@ TRC_PWR_WDT_TIMER_REFUSE
void pwr_mgmt_dev_resume(void)
Device config resume interface.
void pwr_mgmt_load_context(void)
Load context function.
@ PMR_PLF_DEEP_SLEEP_DISABLED
Flag to indicate that platform does not support deep sleep.
@ TRC_PWR_BLE_TIMER_REFUSE
@ PMR_TL_RX_ONGOING
Flag indicating that an RX transfer is ongoing on Transport Layer.
void pwr_mgmt_ble_wakeup(void)
Wake the BLE core via an external request.
void pwr_mgmt_register_trace_func(trace_func_t status_trace_func, trace_func_t sched_trace_func)
Trace function register.