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="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>OSSetPowerCallback</TITLE>
9</HEAD>
10<BODY>
11<H1>OSSetPowerCallback</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/os.h&gt;
16
17typedef void (*OSPowerCallback)(void);
18
19OSPowerCallback OSSetPowerCallback(OSPowerCallback callback);
20</pre></dd></dl>
21
22<H2>Arguments</H2>
23<TABLE class="arguments" border="1" >
24  <TBODY>
25    <TR>
26<TH>callback</TH>
27<TD>Pointer to the callback function called at time of power button input.</TD>
28    </TR>
29  </TBODY>
30</TABLE>
31
32<H2>Return Values</H2>
33<P>Returns a pointer to a previously set callback function.</P>
34
35<H2>Description</H2>
36<P>Registers a one time power button callback. The callback function is called only once when the Power Button on the console is pressed or when the Power Button on the paired Wii Remote is held down, and then callback registration is automatically deleted. In principle, the application receiving the power button callback must execute shutdown procedures within a set amount of time.</P>
37
38<P><B><B>Note:</B></B>Because the power button callback is called in a state that prohibits interrupts, you should keep the process performed by the application as short as possible.</P>
39
40<H2>See Also</H2>
41<P class="reference">
42<A href="../toc.html#Reset Button" target="contents">Reset Button Functions</A>
43</P>
44
45<H2>Revision History</H2>
46<P>
472006/08/30 Added a description about the Power Button on the Wii Remote.<BR>2006/08/10 Initial version.<br>
48</P>
49
50<hr><p>CONFIDENTIAL</p></body>
51</HTML>