At 5:47 AM +0000 2002/02/07, prathit wrote:
>thanx! but i am writing a device driver which i guess does not have any event loop as 
>such. so what should i do?

Exactly as I said you should do... post a vchrPowerOff event. The main event loop of 
*any* currently running application will pass the event to SysHandleEvent, and the 
device will fall asleep.

  EvtEnqueueKey(vchrPowerOff, 0, commandKeyMask);

Note the above API can be safely invoked from within an interrupt service routine.


>do u know how to use syssleep.it seems to be the only way.

Do *not* call SysSleep. This is a system-use-only function. Doing so can confuse the 
OS.

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/tech/support/forums/

Reply via email to