Go to the documentation of this file.
50 #ifndef __GR55XX_PWR_H_
51 #define __GR55XX_PWR_H_
57 #include "system_gr55xx.h"
bool pwr_mgmt_ble_wakeup(void)
Wake the BLE core via an external request.
void(* io_dump_func_t)(void)
function registered to dump io configuration.
uint32_t pwr_ble_ths
BLE timer threshold.
pwr_mgmt_mode_t pwr_mgmt_get_sleep_mode(void)
Query the sleep mode that the current system can access.
void pwr_mgmt_init(pwr_table_t *p_pwr_table, mcu_clock_type_t sys_clk)
PMU Initialization Function.
pwr_mgmt_mode_t pwr_mgmt_baseband_state_get(void)
Get the power state of baseband.
pwr_mgmt_mode_t
power manager model.
void pwr_mgmt_mode_set(pwr_mgmt_mode_t pm_mode)
Set the specified sleep mode.
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_table_t pwr_table[]
pwr table.
pwr_mgmt_dev_state_t(* pwr_dev_check_func_t)(void)
Device check function type.
void pwr_mgmt_dev_init(periph_func_t p_periph_init)
Peripheral Controller Initialization Register interface.
uint16_t pwr_ext
External wake-up.
@ TRC_PWR_BLE_TIMER_PASS
BLE timer pass.
void(* periph_func_t)(void)
Peripheral function type.
void pwr_mgmt_load_context(void)
Load context function.
power manager setting parameter.
parameter configuration table.
void pwr_mgmt_mem_ctl_set(uint32_t mem_sleep_state, uint32_t mem_work_state)
Mem state control under deep sleep & work state.
@ TRC_PWR_APP_TIMER_PASS
App timer pass.
uint16_t pwr_delay_hus
Delay half us.
@ DEVICE_BUSY
Device busy state.
boot_mode_t
power manager boot type.
void pwr_mgmt_register_trace_func(trace_func_t trace_func)
Trace function register.
uint8_t pwr_delay_hslot
Delay half slot.
void pwr_mgmt_check_ble_event(void)
Check whether there are ble events in the queue, and if so, handle them immediately.
void pwr_mgmt_wakeup_source_clear(uint32_t wakeup_source)
Clear the wakeup source.
pwr_mgmt_mode_t pwr_mgmt_mode_get(void)
Get the specified sleep mode.
void pwr_mgmt_notify_timer_event(notify_timer_event_t timer_event)
This function is used to push startup information in app timer.
@ TRC_PWR_APP_TIMER_REFUSE
App timer refuse.
void pwr_mgmt_wakeup_source_setup(uint32_t wakeup_source)
Set the wakeup source.
pwr_mgmt_mode_t pwr_mgmt_check_ext_timer(void)
Get the state of extenal timer.
notify_timer_event_t
power manager app timer work state.
@ TRC_PWR_DSLEEP_MODE
Deep sleep mode.
uint32_t pwr_mgmt_rtc_timer_thrd
RTC timer threshold.
@ WARM_BOOT
Warm boot state.
void pwr_mgmt_dev_resume(void)
Device config resume interface.
@ EVENT_APP_TIMER_START
App-timer start state.
void(* pwr_before_sleep_func_t)(void)
Before sleep function type.
@ TRC_PWR_BLE_RET_DSLEEP
BLE return deep sleep.
@ TRC_PWR_ACTIVE_MODE
Active mode.
void pwr_mgmt_disable_nvic_irq(void)
Disable nvic irq.
void pwr_mgmt_update_wkup_param(void)
Update wakeup param.
uint32_t pwr_timer_ths
APP timer threshold.
bool pwr_mgmt_check_pend_irq(void)
Check nvic irq.
@ TRC_PWR_WFE_MODE
WFE mode.
void pwr_mgmt_schedule(void)
Sleep Policy Scheduling Function.
uint32_t pwr_mgmt_ble_core_thrd
BLE timer threshold.
uint16_t pwr_push_hus
Push half us.
void(* mem_check_proc_t)(void)
mem check process type.
void pwr_mgmt_save_context(void)
Save context function.
@ DEVICE_IDLE
Device idle state.
uint32_t pwr_mgmt_app_timer_thrd
App timer threshold.
@ PMR_MGMT_ACTIVE_MODE
Full speed state.
@ COLD_BOOT
Cold boot state.
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 ...
pwr_mgmt_dev_state_t
power manager device work state.
void(* trace_func_t)(uint8_t)
Trace function type.
void pwr_mgmt_register_io_dump_func(io_dump_func_t dump_func)
function registered to dump io configuration.
boot_mode_t pwr_mgmt_get_wakeup_flag(void)
Get the current boot mode.
void pwr_mgmt_enable_nvic_irq(void)
Enable nvic irq.
uint16_t pwr_dur
Duration.
@ PMR_MGMT_SLEEP_MODE
Deep sleep state.
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.
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.
@ EVENT_APP_TIMER_STOP
App-timer stop state.
void pwr_mgmt_set_wakeup_flag(boot_mode_t boot_mode)
Mark the mode of next boot, cold boot or warm boot.
pwr_mgmt_dev_state_t pwr_mgmt_dev_suspend(void)
Device config suspend interface.
@ PMR_MGMT_IDLE_MODE
Idle state.