About Power Management!

  • Thread starter Thread starter Tommy
  • Start date Start date
T

Tommy

hi,

I got a big truble that I dont know how to apply different strategys
to the device.
Tow strategys I wana appliy to the device.
(1)When system got no any input event such as keypressd,the power of
backlight will turn off as the timeout condition being met.
(2)As our device is designed for data collection, we should keep the
bakclight on during the data collection until the end of that.
When device is not doing data collection, we take (1) as the pm
strategy,on the other hand,after data collection started, we take (2) .
How can I realize that? Dose anyone could help me?
Any suggesion is welcom and will be appreciated.
 
Now our codes can make the backlight off when the timeout event
trggled.
As I mentioned, we need a different strategy when the data collection
working.
During that time,the backlight should keep on until the data collection
completed.

To be clear,I pasted my code fragment here. The fragment is extracted
from the Backlight Device driver.I want to do a test to make the
backlight keep on about 30 seconds by invoking the pm
api--SetPowerRequirement.But,the result is the backlight will be turn
off after the time,15s,past(timeout).It doesnt go the way we want it go
which shouldnt turn off after 15s timeout trggled.
I dont know whether I state that clearly. Please give me some
suggestions that will be
greatly appreciated!
Thank in advance!

---code fragement:
CreateFile(TEXT("BAK1:"),GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,0);
SetPowerRequirement(TEXT("BAK1:"),D0,POWER_NAME,NULL,0);
Sleep(30000);
ReleasePowerRequirement(hResult);
 
Thanks for your suggestion. I have to say the key word
"SystemIdleTimerReset" make a lot sense.
 
There's a function that you should call periodically, SystemIdleTimerReset,
which should achieve what you're looking for. If you do a search within
this group you should be able to find the information you're looking for.

David
 
Back
Top