![]() |
WE310F5
39.00.000
|
This section describes the M2MB API for power management module. More...
#define | M2MB_SYSTEM_STABALIZE_TIME_MS 200 |
#define | UNUSED(x) ((void)(x)) |
typedef VOID(* | M2MB_SLEEP_CB_T) (UINT32 expected_idle_time, void *param) |
INT32 | m2mb_pwr_mgmt_standby (UINT32 duration) |
m2mb_pwr_mgmt_standby puts the system to standby mode. More... | |
INT32 | m2mb_pwr_mgmt_cfg_sleep (UINT32 enable, UINT32 duration) |
m2mb_pwr_mgmt_cfg_sleep configures the sleep mode. More... | |
INT32 | m2mb_pwr_mgmt_cfg_sleep_cb (M2MB_SLEEP_CB_T after, M2MB_SLEEP_CB_T before) |
m2mb_pwr_mgmt_cfg_sleep_cb configures callback for the sleep mode. More... | |
This section describes the M2MB API for power management module.
The power management module provides APIs to the system to different power save mode. There are three power save mode, sleep, deep-sleep and standby mode.
#define M2MB_SYSTEM_STABALIZE_TIME_MS 200 |
Definition at line 54 of file m2mb_pwr_mgmt.h.
#define UNUSED | ( | x | ) | ((void)(x)) |
Definition at line 56 of file m2mb_pwr_mgmt.h.
Definition at line 60 of file m2mb_pwr_mgmt.h.
m2mb_pwr_mgmt_cfg_sleep configures the sleep mode.
m2mb_pwr_mgmt_cfg_sleep is used to enable or disable the sleep mode.
[in] | enable | Set to one to enable sleep mode else set to zero to disable it. |
[in] | duration | This value is used only when enable is set to 1. If set to 0, by default it goes to sleep mode. If set to 0xFFFFFFFF it goes to deep sleep mode for infinite time and if set to other than this two value it goes to deep sleep for the duration mentioned. If user sets 0 as duration then after wakeup it automatically goes to sleep again. But if user sets other than 0, then to go to deep-sleep mode user has to agian call thi API. |
INT32 m2mb_pwr_mgmt_cfg_sleep_cb | ( | M2MB_SLEEP_CB_T | after, |
M2MB_SLEEP_CB_T | before | ||
) |
m2mb_pwr_mgmt_cfg_sleep_cb configures callback for the sleep mode.
m2mb_pwr_mgmt_cfg_sleep_cb is used to set the callback to be called before entering sleep mode and after coming out of sleep mode.
[in] | before | callback API to be called before entering sleep mode. |
[in] | after | callback API to be called after coming out of sleep mode. |
[in] | ctx | Context to be passed in the above two APIs. |
Example
m2mb_pwr_mgmt_standby puts the system to standby mode.
m2mb_pwr_mgmt_standby puts the system in standby mode.
[in] | duration | Duration in msec. |