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 http-equiv="Content-Style-Type" content="text/css">
6<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
7<TITLE>WPADGetInfo</TITLE>
8</HEAD>
9<BODY>
10
11<H1>WPADGetInfo</H1>
12
13
14<H2>C Specification</H2>
15<DL>
16  <DD>
17<PRE><code>#include &lt;revolution/wpad.h&gt;</CODE></PRE>
18  <DD>
19  <PRE><CODE>
20#define WPAD_CHAN0                    0
21#define WPAD_CHAN1                    1
22#define WPAD_CHAN2                    2
23#define WPAD_CHAN3                    3
24
25#define WPAD_BATTERY_LEVEL_LOW        1
26#define WPAD_BATTERY_LEVEL_MEDIUM     2
27#define WPAD_BATTERY_LEVEL_HIGH       3
28#define WPAD_BATTERY_LEVEL_MAX        4
29
30#define WPAD_LED_CHAN_1             0x1
31#define WPAD_LED_CHAN_2             0x2
32#define WPAD_LED_CHAN_3             0x4
33#define WPAD_LED_CHAN_4             0x8
34
35
36typedef struct WPADInfo
37{
38<table>
39<tr><td width="75"><code>BOOL</code></td><td><code> dpd;</code></td>
40<tr><td width="75"><code>BOOL</code></td><td><code> speaker;</code></td>
41<tr><td width="75"><code>BOOL</code></td><td><code> attach;</code></td>
42<tr><td width="75"><code>BOOL</code></td><td><code> lowBat;</code></td>
43<tr><td width="75"><code>u8</code></td><td><code>   battery;</code></td>
44<tr><td width="75"><code>u8</code></td><td><code>   led;</code></td>
45<tr><td width="75"><code>u8</code></td><td><code>   protocol;</code></td>
46<tr><td width="75"><code>u8</code></td><td><code>   firmware;</code></td>
47</table>
48}
49
50s32 WPADGetInfo( s32 chan, WPADInfo *info );
51</code></PRE>
52</DL>
53<H2>Arguments</H2>
54<TABLE border="1">
55  <TBODY>
56    <TR>
57<TD><code><b><i>chan</i></b></code></TD>
58<TD>One of <code>WPAD_CHAN<i>n</i></code> values.</TD>
59    </TR>
60    <TR>
61<TD><code><b><i>info</i></b></code></TD>
62<TD>A pointer to <code>WPADInfo</code> that copies the obtained information.</TD>
63    </TR>
64  </TBODY>
65</TABLE>
66<H2>Return Values</H2>
67<p>
68Returns one of the following codes:
69</p>
70<p>
71<code>WPAD_ERR_NONE</code><br> <code>WPAD_ERR_NO_CONTROLLER</code><br> <code>WPAD_ERR_BUSY</code><br> <code>WPAD_ERR_TRANSFER</code>
72
73</P>
74<H2>Description</H2>
75<p>
76Gets the status of the Wii Remote for the specified channel. This function registers a status-requesting command to the WPAD library, and waits for the WPAD library to complete its processes.
77
78<p>
79Can get the following status types.
80<table border="1">
81<tr><td><code>dpd</code></td><td><code>The pointer's operational status.</code></td>
82<tr><td><code>speaker</code></td><td><code>The speaker's operational status.</code></td>
83<tr><td><code>attach</code></td><td><code>External extension controller connection status.</code></td>
84<tr><td><code>lowBat</code></td><td><code>Whether the battery has fallen below a certain level.</code></td>
85<tr><td><code>battery</code></td><td>Expresses the battery level in four (<code>WPAD_BATTERY_LEVEL_*</code>) levels.</td>
86<tr><td><code>led</code></td><td>The illumination status (<code>WPAD_LED_CHAN_*</code>) of the four player indicators.</td>
87<tr><td><code>protocol</code></td><td><code>Not used.</code></td>
88<tr><td><code>firmware</code></td><td><code>Not used.</code></td>
89</table>
90</p>
91<p>
92The return values have the following meanings:
93<table border="1">
94<tr><td><code>WPAD_ERR_NONE</code></td><td><code>Status was gotten normally.</code></td>
95<tr><td><code>WPAD_ERR_BUSY</code></td><td><code>The WPAD library was unable to receive a command.</code></td>
96<tr><td><code>WPAD_ERR_NO_CONTROLLER</code></td><td><code>The connection was broken.</code></td>
97<tr><td><code>WPAD_ERR_TRANSFER</code></td><td><code>A communications error prevented normal processing of the command.</code></td>
98</table>
99</p>
100
101<H2>See Also</H2>
102<p>
103<A href="./toc.html" target="contents"><CODE>WPAD</CODE> Functions</A><br> <A href="./WPADGetInfoAsync.html"><CODE>WPADGetInfoAsync</code></a><br> <a href="./WPADInfo.html"><code>WPADInfo</code></a><br>
104</p>
105
106<H2>Revision History</H2>
107<p>
10808/15/2006 Added a link to WPADInfo<BR>06/19/2006 Initial version<BR>
109</p>
110<hr>
111<P>CONFIDENTIAL</p>
112</BODY>
113</HTML>