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_SetAutoExit</TITLE> 8<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">PM_SetAutoExit <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>void PM_SetAutoExit( BOOL sw ); 17</CODE></PRE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" width="100%"> 21 <TBODY> 22 <TR> 23<TD width="13%"><EM><STRONG>sw</STRONG></EM></TD> 24<TD width="87%">Whether to exit automatically.</TD> 25 </TR> 26 </TBODY> 27</TABLE> 28<H2>Return Values</H2> 29<P>None.</P> 30<H2>Description</H2> 31<P>Configures whether to proceed automatically to hardware reset or power-off after exit processing has finished.</P> 32<P>The TWL console transitions to exit processing when the Power Button is pressed (depending on how long the button is held down, this leads to either hardware reset or power-off) or when a drop in the remaining battery life has been detected (this leads to power-off). When the Power Button is pressed or when the battery level becomes low, this event triggers an interrupt from the microprocessor to the ARM7, and notification is sent to the ARM9. The ARM9 then calls the exit callbacks and notifies the ARM7 when exit preparations are finished. The ARM7 then resets the hardware or turn the power OFF.</P> 33<P>Transmission from the ARM7 to the ARM9 is executed only once. In other words, even if the Power Button is pressed again before a message can be sent to the ARM7 indicating that the ARM9 has finished preparation for shutdown, that notification is not sent from the ARM7. As such, the shutdown callback process is not executed again regardless of the time at which the Power Button is pressed.</P> 34<P>The <CODE>PM_SetAutoExit</CODE> function specifies whether the <I>system</I> or the <I>application</I> informs the ARM7 that preparations to exit are complete after the ARM9 has invoked the exit callbacks. The value of the <SPAN class="argument">sw</SPAN> argument results in the following. 35</P> 36<TABLE border="1"> 37 <TBODY> 38 <TR> 39<TH>Value of the <SPAN class="argument">sw</SPAN> Argument</TH> 40<TH>Operation</TH> 41 </TR> 42 <TR> 43<TD><CODE>TRUE</CODE></TD> 44<TD>After the callbacks have been invoked, the system will continue exit processing and either reset the hardware or turn the power OFF. (default)</TD> 45 </TR> 46 <TR> 47<TD><CODE>FALSE</CODE></TD> 48<TD>After the callbacks have been invoked, the ARM7 will not be notified that exit preparations are complete. This must be done by the application.</TD> 49 </TR> 50 </TBODY> 51</TABLE> 52<P><BR> When <CODE>PM_SetAutoExit( FALSE )</CODE> is run, the application must explicitly notify the ARM7 that exit preparations are complete. Call the <A href="PM_ReadyToExit.html"><CODE>PM_ReadyToExit</CODE></A> function as quickly as possible. If the user continuously presses the Power Button, the system is forcibly powered OFF in several seconds as part of hardware specifications. There is also no notification if the shutdown process is entered due to low battery charge.</P> 53<P><A href="PM_GetAutoExit.html"><CODE>PM_GetAutoExit</CODE></A> is the function used to get the auto exit setting value.</P> 54 55 56<H2>See Also</H2> 57<P><A href="PM_GetAutoExit.html"><CODE>PM_GetAutoExit</CODE></A><BR> <A href="PM_ReadyToExit.html"><CODE>PM_ReadyToExit</CODE></A></P> 58<H2>Revision History</H2> 59<P>2009/06/03 Removed a description of the <CODE>PM_Init</CODE> function (because <CODE>OS_Init</CODE> is now required). <BR>2008/12/11 Noted that the shutdown callback is not invoked twice. <BR>2008/02/07 Initial version.</P> 60<hr><p>CONFIDENTIAL</p></body> 61</HTML>