1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>PM_GetExitFactor</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">PM_GetExitFactor <IMG src="../../image/TWL.gif" width="24" height="12" border="0" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15 <PRE><CODE>#include <twl/spi.h></CODE></PRE> 16 <PRE><CODE>PMExitFactor PM_GetExitFactor( void ); 17 </CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<P>None.</P> 21<H2>Return Values</H2> 22<P>Cause for exit processing.</P> 23<H2>Description</H2> 24<P>Gets the cause that led to exit processing.</P> 25<P>The return values have the following meanings. When the system has not entered exit processing, the return value is <CODE>PM_EXIT_FACTOR_NONE</CODE>.<BR> 26</P> 27<TABLE border="1"> 28 <TBODY> 29 <TR> 30 <TH><CODE>Return Values</CODE></TH> 31 <TH>Cause for exit processing </TH> 32 </TR> 33 <TR> 34 <TD><CODE>PM_EXIT_FACTOR_PWSW</CODE></TD> 35 <TD>The Power Button was detected to be held down longer than a fixed amount of time</TD> 36 </TR> 37 <TR> 38 <TD><CODE>PM_EXIT_FACTOR_BATTERY</CODE></TD> 39 <TD>The ARM7 detected a drop in battery power</TD> 40 </TR> 41 <TR> 42 <TD><CODE>PM_EXIT_FACTOR_USER</CODE></TD> 43 <TD>The user forced a hardware reset or power-off</TD> 44 </TR> 45 <TR> 46 <TD><CODE>PM_EXIT_FACTOR_NONE</CODE></TD> 47 <TD>(Not in exit processing.)</TD> 48 </TR> 49 </TBODY> 50</TABLE> 51<P><B><BR> <BR> Reset or Power-Off Transition</B></P> 52<P>When the value is <CODE>PM_EXIT_FACTOR_PWSW</CODE>, it is not yet known whether this will lead to a hardware reset or whether it will lead to a power-off. Which sequence it becomes depends upon the time at which the Power Button is released.</P> 53<P>When the value is <CODE>PM_EXIT_FACTOR_BATTERY</CODE>, the power-off sequence will begin.</P> 54<P>When the value is <CODE>PM_EXIT_FACTOR_USER</CODE>, the <CODE><A href="PM_ForceToResetHardware.html">PM_ForceToResetHardware</A></CODE> or <CODE><A href="PM_ForceToPowerOff.html">PM_ForceToPowerOff</A></CODE> function has been called, so the hardware reset or shutdown sequence will begin.</P> 55<P>In any case, the exit callback must end promptly.</P> 56<P><BR> <BR> <B><CODE>The <CODE>PM_EXIT_FACTOR_USER</CODE> Return Value</CODE></B> </P> 57<P>This value is set when execution has passed through the <CODE><A href="PM_ForceToResetHardware.html">PM_ForceToResetHardware</A></CODE> or <CODE><A href="PM_ForceToPowerOff.html">PM_ForceToPowerOff</A></CODE> function. A value of <CODE>PM_EXIT_FACTOR_USER</CODE> will be set even if these functions are called ultimately from another system function rather than directly by the user. For example, a call to the <CODE><a href="../../os/appJump/OS_JumpToSystemMenu.html">OS_JumpToSystemMenu</a></CODE> function ultimately causes execution to reach the <CODE><A href="PM_ForceToResetHardware.html">PM_ForceToResetHardware</A></CODE> function.</P> 58<H2>See Also</H2> 59<P><CODE><A href="PM_SetExitCallbackInfo.html">PM_SetExitCallbackInfo</A>, <A href="PM_SetAutoExit.html">PM_SetAutoExit</A>, <A href="PM_GetAutoExit.html">PM_GetAutoExit</A><BR></CODE></P> 60<H2>Revision History</H2> 61<P>2008/05/01 Added <CODE>PM_EXIT_FACTOR_USER</CODE>. 2008/02/07 Initial version.</P> 62<hr><p>CONFIDENTIAL</p></body> 63</HTML>