wince6.0电源管理之应用程序调用SetSystemPowerState的执行过程
欢迎转贴,但请保留源blog链接,谢谢。http://blog.csdn.net/bbw2008/archive/2010/03/18/5393463.aspx
如有错误,欢迎各位看客,不吝赐教,小弟先谢过了
SetSystemPowerState() ----------------ap layer
|
| core_common.def
| PM_ SetSystemPowerState;----(WINCE600/PRIVATE/WINCEOS/COREOS/DEVICE/PMIF/pmif.c)
|
PMSetSystemPowerState (/WINCE600/PUBLIC/COMMON/OAK/DRIVERS/PM/MDD/pmsysstate.cpp)
|
PlatformSendSystemPowerState (/WINCE600/PUBLIC/COMMON/OAK/DRIVERS/PM/PDD/DEFAULT/platform.cpp)
|
g_pPowerStateManager->SendSystemPowerState
/WINCE60/PUBLIC/COMMON/OAK/DRIVERS/PM/PDD/DEFAULT/pwsdef.cpp
|
pNewPowerState->EnterState(); /WINCE600/PUBLIC/COMMON/OAK/DRIVERS/PM/PDD/DEFAULT/pwsdef.cpp
pNewPowerState = SetSystemState()
|
PmSetSystemPowerState_I() (/WINCE600/PUBLIC/COMMON/OAK/DRIVERS/PM/MDD/pmsysstate.cpp)
|
PlatformSetSystemPowerState (/WINCE600/PUBLIC/COMMON/OAK/DRIVERS/PM/PDD/DEFAULT/platform.cpp)
|
PowerOffSystem()
|
| kwin32.c
| NKPowerOffSystem() (WINCE600/PRIVATE/WINCEOS/COREOS/NK/KERNEL/kwin32.c)
Kcall((PKFN)CallOEMPowerOff)
|
| CallOEMPowerOff()
| /下面这两个函数的名字,不同的OEM厂商个有不同
OEMPowerOff() |----BSPConfigGPIOforPoweroff 设置默认睡眠模式下中断的的功能
(PLATFORM/name/SRC/COMMON/POWER/off.c)|
| |--- S5p6440_wakeupsource_configure 配置唤醒源
| |
BSPowerOff()--------------------------------
OALCpuPowerOff()//now in sleep