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>WPADInfo</title>
9</head>
10
11<body>
12
13<h1>WPADInfo</h1>
14
15<H2>Syntax</H2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/wpad.h&gt;
18
19#define WPAD_BATTERY_LEVEL_CRITICAL   0
20#define WPAD_BATTERY_LEVEL_LOW        1
21#define WPAD_BATTERY_LEVEL_MEDIUM     2
22#define WPAD_BATTERY_LEVEL_HIGH       3
23#define WPAD_BATTERY_LEVEL_MAX        4
24
25#define WPAD_LED_CHAN_1             0x1
26#define WPAD_LED_CHAN_2             0x2
27#define WPAD_LED_CHAN_3             0x4
28#define WPAD_LED_CHAN_4             0x8
29
30typedef struct WPADInfo
31{
32    BOOL dpd;
33    BOOL speaker;
34    BOOL attach;
35    BOOL lowBat;
36    BOOL nearempty;
37    u8 battery;
38    u8 led;
39    u8 protocol;
40    u8 firmware;
41}
42</pre></dd></dl>
43
44<H2>Elements</H2>
45<TABLE class="arguments" border="1" >
46<tr><th>dpd</th><td>The Pointer's operational status.</td>
47<tr><th>speaker</th><td>The speaker's operational status.</td>
48<tr><th>attach</th><td>External extension controller connection status.</td>
49<tr><th>lowBat</th><td>Whether the indicator brightness is dropping. Voltages that change the indicator brightness exhibit hysteresis. Note that the brightness will drop when the battery level reaches <code>WPAD_BATTERY_LEVEL_LOW</code>, but the brightness will not be restored immediately even if the battery level changes to <code>WPAD_BATTERY_LEVEL_MEDIUM</code> afterwards.</td>
50<tr><th>nearempty</th><td>Whether there is a small amount of audio data left in the sound buffer.</td>
51<tr><th>battery</th><td>The battery level, indicated on a scale of five (<code>WPAD_BATTERY_LEVEL_*</code>). Indicates how much battery charge currently remains.</td>
52<tr><th>led</th><td>The illumination status (<code>WPAD_LED_CHAN_*</code>) of the four Player Indicators.</td>
53<tr><th>protocol</th><td>Not used.</td>
54<tr><th>firmware</th><td>Not used.</td>
55</table>
56
57<h2>Description</h2>
58<p>
59This structure represents the status of the Wii Remote.
60</p>
61<ul>
62<li>The pointer's operational status.</li>
63</ul>
64<blockquote>
65<code>TRUE</code> is stored when the Pointer has been launched with the <a href="./WPADControlDpd.html"><code>WPADControlDpd</code></a> function; <code>FALSE</code> is stored if it is stopped.
66</blockquote>
67
68<ul>
69<li>The speaker's operational status.</li>
70</ul>
71<blockquote>
72<CODE>TRUE</CODE> is stored when the speaker has been launched with the <a href="./WPADControlSpeaker.html"><code>WPADControlSpeaker</code></a> function; <CODE>FALSE</CODE> is stored if it is stopped.
73</blockquote>
74
75<ul>
76<li>External extension controller connection status.</li>
77</ul>
78<blockquote>
79<CODE>TRUE</CODE> is stored if an external extension controller is connected; <CODE>FALSE</CODE> is stored otherwise.
80</blockquote>
81
82<ul>
83<li>Remaining Battery Power</li>
84</ul>
85<blockquote>
86You can use <SPAN class="argument">battery</SPAN> to determine how much battery charge remains in the Wii Remote. While the Wii Remote is connecting or while it is being registered, the remaining battery charge is displayed with the four Player LEDs. <SPAN class="argument">battery</SPAN> is stored at one of five levels. If <SPAN class="argument">battery</SPAN> is <code>WPAD_BATTERY_LEVEL_CRITICAL</code>, the battery charge can be recognized as going down quickly. Because the battery charge can vary depending on the type of battery, the remaining operational time may range between 20 seconds to 16 minutes.
87</blockquote>
88
89<ul>
90<li>Indicator Brightness</li>
91</ul>
92<blockquote>
93The Player Indicators on the Wii Remote will dim if the remaining battery charge gets low. You can use <span class="argument">lowBat</span> to determine if the current brightness is normal. Voltages that change the brightness of the Player Indicators exhibit hysteresis. The brightness will fall when <SPAN class="argument">battery</SPAN> is <code>WPAD_BATTERY_LEVEL_LOW</code>, and <SPAN class="argument">lowBat</SPAN> will be set to <code>TRUE</code>. Note that the brightness will not return immediately even if <SPAN class="argument">battery</SPAN> is set to <code>WPAD_BATTERY_LEVEL_MEDIUM</code> afterwards.
94</blockquote>
95
96<ul>
97<li>Remaining audio data</li>
98</ul>
99<blockquote>
100Stores <code>TRUE</code> if the audio data remaining in the sound buffer is close to empty, and <code>FALSE</code> otherwise.
101</blockquote>
102
103<ul>
104<li>Player LED</li>
105</ul>
106<blockquote>
107The on/off status of the four Player Indicators for the Wii Remote is stored as a bit pattern. The lowest bit corresponds to the left of the player indicator.
108</blockquote>
109
110<ul>
111<li>Protocol Type</li>
112</ul>
113<blockquote>
114This member is not used.
115</blockquote>
116
117<ul>
118<li>Firmware Version</li>
119</ul>
120<blockquote>
121This member is not used.
122</blockquote>
123
124<H2>See Also</H2>
125<p class="reference">
126<a href="./WPADGetInfo.html">WPADGetInfo</a>,
127<a href="./WPADGetInfoAsync.html">WPADGetInfoAsync</a>
128</p>
129
130<H2>Revision History</H2>
131<P>
1322008/07/08 Revised explanations related to <span class="argument">lowBat</span> and <span class="argument">battery</span>.<br>2007/09/18 Added <SPAN class="argument">nearempty</SPAN>.<br>2006/09/06 Added <CODE>WPAD_BATTERY_LEVEL_CRITICAL</CODE>.<br>2006/08/15 Initial version.<br>
133</P>
134
135<hr><p>CONFIDENTIAL</p></body>
136</HTML>