I am attempting to customize the behavior of our device. Based on the
state of an Event we want to have two different behaviors for the power
button. 1) Function as normal (On-Suspend) 2) Go to a fake suspend
state. My understanding is that unattended mode has this
characteristic. Right now my keypad driver issues the following
commands -
SetSystemPowerState(NULL, POWER_STATE_SUSPEND, POWER_FORCE);
SetSystemPowerState(NULL, POWER_STATE_ON, POWER_FORCE);
The problem is that when I issue the call
PowerPolicyNotify(PPN_UNATTENDEDMODE, TRUE); the screen does not blank
and all the buttons quit responding even the power button! There is a
post from David Liao (MS) that says to use the PPN_POWERBUTTONPRESSED
but there is no documentation of this and I did not understand his
post?
I have two paths I need to take:
1- Pwr Button -> unattended mode
Device Driver -> Suspend
Device Driver -> On
2- Pwr Button -> unattended mode
Pwr Button -> On
Any help would be appreciated as the documentation is extremely brief.
Gerrit