I've found a bug in a driver which can be avoided by powering the device
off. I'm trying to programmatically power the device off and then
immediately back on again.
My code successfully enqueues a keyDownEvent with chr = vchrAutoOff, and the
device sleeps as expected. I also set an alarm for TimGetSeconds() + 1 so
the device will wake up one second later. The result is that the device
doesn't sleep. Apparently the alarm is triggered before the device sleeps,
so it never fully goes to sleep.
To make sure the alarm is set as late as possible in the sleep process I
register for the sysNotifySleepNotifyEvent. I use a high priority value of
240 so my program will receive the notification last. While handling the
sysNotifySleepNotifyEvent I set the alarm. The results are the same.
If instead I set the alarm for TimGetSeconds() + 2 the device always sleeps
as expected, but it can take 6-10 seconds to wake up again, which is too
long for my application.
Can anyone suggest a reliable way to put the device to sleep and wake it up
quickly?
Thanks,
-Bob Whiteman
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/