WM/WINCE代码研读系列之 Power Management(2)

本文详细介绍了系统电源状态变迁的过程,包括不同触发条件导致的状态变化,如背光关闭超时、用户活动或应用按钮按下等,并提供了具体的函数调用示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

系统电源状态变迁示意图

WM/WINCE 电源管理状态图

 

1. Backlightoff Timeout

2. User Activity or AppButtonPressed

3. UserIdle Timeout

4. User Activity or AppButtonPressed

5. PowerButtonPressed or Suspend Timeout

6. PowerButtonPressed or AppButtonPressed

7. UserIdle Timeout

8. PowerButtonPressed or Suspend Timeout

9. PowerButtonPressed or Suspend Timeout

10. UnattendedRefCount == 0 or SuspendTimeout

11. Wakeup from Suspended status

12. ResumingSuspendTimeout

13. PowerButtonPressed or AppButtonPressed

14. Suspend Timeout

15. PowerButtonPressed or AppButtonPressed

 

SetSystemPowerState()

16. SetSystemPowerState(NULL,POWER_STATE_ON,POWER_FORCE) or SetSystemPowerState(L"on",0,0);

17. SetSystemPowerState(NULL,POWER_STATE_USERIDLE,POWER_FORCE) or SetSystemPowerState(L"useridle",0,0);

18. SetSystemPowerState (NULL,POWER_STATE_RESET,POWER_FORCE) or SetSystemPowerState(L"reboot",0,0);

19. SetSystemPowerState (NULL,POWER_STATE_SUSPEND,POWER_FORCE) or SetSystemPowerState(NULL,POWER_STATE_OFF,POWER_FORCE) or SetSystemPowerState(NULL,POWER_STATE_CRITICAL,POWER_FORCE) or SetSystemPowerState(L"suspend",0,0);

20. SetSystemPowerState(NULL,POWER_STATE_IDLE,POWER_FORCE) or SetSystemPowerState(L"screenoff",0,0);

21. SetSystemPowerState(L"coldreboot",POWER_STATE_RESET,POWER_FORCE)

注意:

1.Windows Mobile 6 Professional和Windows Mobile 6 Classic(即PocketPC)下,没有UserIdle状态,3,4,7,8,9,17这几个迁移线也就不存在。

2.Windows Mobile 6 Standard(即SmartPhone)下,没有Unattended,Resuming,Suspended三个状态,5,6,8,9,10,11,12,13,14这几个迁移线也不存在。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值