At 5:10 PM -0700 2002/04/29, Scott Schoen wrote:
>I know the HwrDisplaySleep() and HwrDisplayWake() are not portable but I need to use 
>them.  I found out the calling arguments for HwrDisplaySleep() are
>
>void HwrDisplaySleep(Boolean, Boolean);
>
>Does anyone know the calling arguments for HwrDisplayWake()?

It takes no arguments. Here are the correct prototypes:

  Err HwrDisplaySleep(Boolean untilReset, Boolean emergency);

  Err HwrDisplayWake(void);

NOTE: When HwrDisplaySleep is called with the emergency parameter == true, it's 
assumed an interrupt service routine invoked the call -- usually it's the non-maskable 
low-battery interrupt, but sometimes it's the primary tick timer that detects when the 
battery has dipped below an "about-to-lose-RAM-contents" energy level. Under this 
condition, the device *must* immediately and impolitely enter a data-retention sleep 
mode from which it will not exit until the batteries are replaced or recharged. So if 
you're intercepting this particular trap, be certain to check this parameter and 
immediately pass on the call, or risk losing the entire contents of RAM if the code 
twiddles around for awhile before passing on the call. Just FYI, because this can be a 
difficult condition to test your code against.

Regards,

Jim Schram
PalmSource Inc.
Partner Engineering

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to