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
14<h1>WPADInfo</h1>
15
16
17<H2>C Specification</H2>
18<DL>
19  <DD>
20<PRE><CODE>#include &lt;revolution/wpad.h&gt;</CODE></PRE>
21  <DD>
22  <PRE><CODE>
23#define WPAD_BATTERY_LEVEL_LOW        1
24#define WPAD_BATTERY_LEVEL_MEDIUM     2
25#define WPAD_BATTERY_LEVEL_HIGH       3
26#define WPAD_BATTERY_LEVEL_MAX        4
27
28#define WPAD_LED_CHAN_1             0x1
29#define WPAD_LED_CHAN_2             0x2
30#define WPAD_LED_CHAN_3             0x4
31#define WPAD_LED_CHAN_4             0x8
32
33typedef struct WPADInfo
34{
35<table>
36<tr><td width="75"><code>BOOL</code></td><td><code> dpd;</code></td>
37<tr><td width="75"><code>BOOL</code></td><td><code> speaker;</code></td>
38<tr><td width="75"><code>BOOL</code></td><td><code> attach;</code></td>
39<tr><td width="75"><code>BOOL</code></td><td><code> lowBat;</code></td>
40<tr><td width="75"><code>u8</code></td><td><code>   battery;</code></td>
41<tr><td width="75"><code>u8</code></td><td><code>   led;</code></td>
42<tr><td width="75"><code>u8</code></td><td><code>   protocol;</code></td>
43<tr><td width="75"><code>u8</code></td><td><code>   firmware;</code></td>
44</table>
45}
46</CODE></PRE>
47</DL>
48<H2>Elements</H2>
49<TABLE border="1" cellpadding="3" cellspacing="0.1">
50  <TBODY>
51<tr><td><code><b><i>dpd</i></b></code></td><td><code>Operational status of the pointer</code></td>
52<tr><td><code><b><i>speaker</i></b></code></td><td><code>Operational status of the speaker</code></td>
53<tr><td><code><b><i>attach</i></b></code></td><td><code>External extension controller connection status.</code></td>
54<tr><td><code><b><i>lowBat</i></b></code></td><td><code>Indicator that the battery has fallen below a certain level.</code></td>
55<tr><td><code><b><i>battery</i></b></code></td><td>Expresses the battery level using four (<code>WPAD_BATTERY_LEVEL_*</code>) levels.</td>
56<tr><td><code><b><i>led</i></b></code></td><td>Illumination status (<code>WPAD_LED_CHAN_*</code>) of the four player indicators.</td>
57<tr><td><code><b><i>protocol</i></b></code></td><td><code>Not used.</code></td>
58<tr><td><code><b><i>firmware</i></b></code></td><td><code>Not used.</code></td>
59  </TBODY>
60</TABLE>
61
62<h2>Description</h2>
63<p>
64The WPADStatus structure represents the status of the Wii Remote.
65<ul>
66<li>Operational status of the pointer</li>
67</ul>
68<blockquote>
69<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 otherwise.
70</blockquote>
71
72<ul>
73<li>Operational status of the speaker</li>
74</ul>
75<blockquote>
76<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.
77</blockquote>
78
79<ul>
80<li>External extension controller connection status.</li>
81</ul>
82<blockquote>
83<CODE>TRUE</CODE> is stored if an external extension controller is connected; <CODE>FALSE</CODE> is stored otherwise.
84</blockquote>
85
86<ul>
87<li>Remaining Battery Power</li>
88</ul>
89<blockquote>
90Indicates how much battery power remains in the Wii Remote with <code><i>lowBat</i></code> and <code><i>battery</i></code>. While the Wii Remote is connecting or while it is being registered, the remaining battery power is displayed with the four player indicators. <code><i>battery</i></code> is stored using four levels in the same way. In addition, when <code><i>battery</i></code> is <code>WPAD_BATTERY_LEVEL_LOW</code>, <i>lowBat</i> is <CODE>TRUE</CODE>.
91</blockquote>
92
93<ul>
94<li>Player LED</li>
95</ul>
96<blockquote>
97The 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.
98</blockquote>
99
100<ul>
101<li>Protocol Type</li>
102</ul>
103<blockquote>
104This member is not used.
105</blockquote>
106
107<ul>
108<li>Firmware Version</li>
109</ul>
110<blockquote>
111This member is not used.
112</blockquote>
113
114</p>
115<H2>See Also</H2>
116<p>
117<A href="./toc.html" target="contents"><CODE>WPAD</CODE> Functions</A><br> <a href="./WPADGetInfo.html"><code>WPADGetInfo</code></a><br> <a href="./WPADGetInfoAsync.html"><code>WPADGetInfoAsync</a></code><br>
118</p>
119
120
121<H2>Revision History</H2>
122<P>
12308/15/2006 Initial version.
124</P>
125<hr>
126<P>CONFIDENTIAL</p>
127</BODY>
128</HTML>