结构体 | |
struct | OsPmLockCB |
struct | LosPmCB |
类型定义 | |
typedef UINT32(* | Suspend) (UINT32 mode) |
电源锁控制块 更多... | |
函数 | |
STATIC | SPIN_LOCK_INIT (g_pmSpin) |
电源模块自旋锁 更多... | |
STATIC VOID | OsPmSysctrlInit (VOID) |
STATIC VOID | OsPmTickTimerStart (LosPmCB *pm) |
STATIC BOOL | OsPmTickTimerStop (LosPmCB *pm) |
STATIC VOID | OsPmCpuResume (LosPmCB *pm) |
VOID | OsPmCpuSuspend (LosPmCB *pm) |
STATIC VOID | OsPmResumePrepare (LosPmCB *pm, UINT32 mode, UINT32 prepare) |
STATIC UINT32 | OsPmSuspendPrepare (Suspend sysSuspendEarly, Suspend deviceSuspend, UINT32 mode, UINT32 *prepare) |
STATIC UINT32 | OsPmSuspendCheck (LosPmCB *pm, Suspend *sysSuspendEarly, Suspend *deviceSuspend, LOS_SysSleepEnum *mode) |
STATIC UINT32 | OsPmSuspendSleep (LosPmCB *pm) |
STATIC UINT32 | OsPmDeviceRegister (LosPmCB *pm, LosPmDevice *device) |
STATIC UINT32 | OsPmSysctrlRegister (LosPmCB *pm, LosPmSysctrl *sysctrl) |
UINT32 | LOS_PmRegister (LOS_PmNodeType type, VOID *node) |
Register a power management node. 更多... | |
STATIC UINT32 | OsPmDeviceUnregister (LosPmCB *pm, LosPmDevice *device) |
STATIC UINT32 | OsPmSysctrlUnregister (LosPmCB *pm, LosPmSysctrl *sysctrl) |
UINT32 | LOS_PmUnregister (LOS_PmNodeType type, VOID *node) |
Unregister a power management node. 更多... | |
VOID | LOS_PmWakeSet (VOID) |
Set the system wake up flag. 更多... | |
LOS_SysSleepEnum | LOS_PmModeGet (VOID) |
获取电源模式 更多... | |
UINT32 | LOS_PmModeSet (LOS_SysSleepEnum mode) |
Set low power mode. 更多... | |
UINT32 | LOS_PmLockCountGet (VOID) |
获取电源锁数量 更多... | |
VOID | LOS_PmLockInfoShow (struct SeqBuf *m) |
显示所有电源锁信息 更多... | |
UINT32 | OsPmLockRequest (const CHAR *name, UINT32 swtmrID) |
请求获取指定的锁 更多... | |
UINT32 | LOS_PmLockRequest (const CHAR *name) |
Request to obtain the lock in current mode, so that the system will not enter this mode when it enters the idle task next time. 更多... | |
UINT32 | LOS_PmLockRelease (const CHAR *name) |
Release the lock in current mode so that the next time the system enters the idle task, it will enter this mode. 更多... | |
STATIC VOID | OsPmSwtmrHandler (UINT32 arg) |
UINT32 | LOS_PmTimeLockRequest (const CHAR *name, UINT64 millisecond) |
Request to obtain the lock in current mode, so that the system will not enter this mode when it enters the idle task next time. After the specified interval, the lock is automatically released. 更多... | |
UINT32 | LOS_PmReadLock (VOID) |
Gets the current PM lock status. 更多... | |
UINT32 | LOS_PmSuspend (UINT32 wakeCount) |
The system enters the low-power flow. 更多... | |
BOOL | OsIsPmMode (VOID) |
STATIC UINT32 | OsPmSuspendDefaultHandler (VOID) |
UINT32 | OsPmInit (VOID) |
LOS_MODULE_INIT (OsPmInit, LOS_INIT_LEVEL_KMOD_EXTENDED) | |
变量 | |
STATIC EVENT_CB_S | g_pmEvent |
STATIC LosPmCB | g_pmCB |
电源控制块全局遍历 更多... | |
STATIC LosPmSysctrl | g_sysctrl |
LOS_MODULE_INIT | ( | OsPmInit | , |
LOS_INIT_LEVEL_KMOD_EXTENDED | |||
) |
UINT32 LOS_PmLockCountGet | ( | VOID | ) |
VOID LOS_PmLockInfoShow | ( | struct SeqBuf * | m | ) |
显示所有电源锁信息
Output the locking information of the pm lock.
Release the lock in current mode so that the next time the system enters the idle task, it will enter this mode.
name | [IN] Who releases the lock. |
error | code, LOS_OK means success. |
Request to obtain the lock in current mode, so that the system will not enter this mode when it enters the idle task next time.
name | [IN] Who requests the lock. |
error | code, LOS_OK means success. |
LOS_SysSleepEnum LOS_PmModeGet | ( | VOID | ) |
获取电源模式
Get the low power mode of the current system.
UINT32 LOS_PmModeSet | ( | LOS_SysSleepEnum | mode | ) |
Set low power mode.
mode | [IN] low power mode. |
error | code, LOS_OK means success. |
UINT32 LOS_PmReadLock | ( | VOID | ) |
Gets the current PM lock status.
None. |
Number | of awakening sources of the device. |
UINT32 LOS_PmRegister | ( | LOS_PmNodeType | type, |
VOID * | node | ||
) |
Register a power management node.
type | [IN] The types supported by the PM module. |
node | [IN] power management node. |
error | code, LOS_OK means success. |
The system enters the low-power flow.
wakeCount | [IN] Number of wake sources. |
error | code, LOS_OK means success. |
Request to obtain the lock in current mode, so that the system will not enter this mode when it enters the idle task next time. After the specified interval, the lock is automatically released.
name | [IN] Who requests the lock. |
millisecond | [IN] Specifies the time to automatically release the lock. |
error | code, LOS_OK means success. |
UINT32 LOS_PmUnregister | ( | LOS_PmNodeType | type, |
VOID * | node | ||
) |
Unregister a power management node.
type | [IN] The types supported by the PM module. |
node | [IN] power management node. |
error | code, LOS_OK means success. |
VOID LOS_PmWakeSet | ( | VOID | ) |
Set the system wake up flag.
None. |
None. |
STATIC INLINE BOOL OsIsPmMode | ( | VOID | ) |
STATIC VOID OsPmCpuResume | ( | LosPmCB * | pm | ) |
VOID OsPmCpuSuspend | ( | LosPmCB * | pm | ) |
STATIC UINT32 OsPmDeviceRegister | ( | LosPmCB * | pm, |
LosPmDevice * | device | ||
) |
STATIC UINT32 OsPmDeviceUnregister | ( | LosPmCB * | pm, |
LosPmDevice * | device | ||
) |
UINT32 OsPmInit | ( | VOID | ) |
请求获取指定的锁
STATIC UINT32 OsPmSuspendCheck | ( | LosPmCB * | pm, |
Suspend * | sysSuspendEarly, | ||
Suspend * | deviceSuspend, | ||
LOS_SysSleepEnum * | mode | ||
) |
STATIC UINT32 OsPmSuspendDefaultHandler | ( | VOID | ) |
STATIC UINT32 OsPmSuspendPrepare | ( | Suspend | sysSuspendEarly, |
Suspend | deviceSuspend, | ||
UINT32 | mode, | ||
UINT32 * | prepare | ||
) |
STATIC VOID OsPmSwtmrHandler | ( | UINT32 | arg | ) |
STATIC VOID OsPmSysctrlInit | ( | VOID | ) |
STATIC UINT32 OsPmSysctrlRegister | ( | LosPmCB * | pm, |
LosPmSysctrl * | sysctrl | ||
) |
STATIC UINT32 OsPmSysctrlUnregister | ( | LosPmCB * | pm, |
LosPmSysctrl * | sysctrl | ||
) |
STATIC VOID OsPmTickTimerStart | ( | LosPmCB * | pm | ) |
STATIC SPIN_LOCK_INIT | ( | g_pmSpin | ) |
电源模块自旋锁
STATIC EVENT_CB_S g_pmEvent |
STATIC LosPmSysctrl g_sysctrl |