1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
9<title>WPADProbe</title>
10</head>
11
12<body>
13
14<h1>WPADProbe</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20<dd><pre><code>#include &lt;revolution/wpad.h&gt;
21
22#define WPAD_CHAN0               0
23#define WPAD_CHAN1               1
24#define WPAD_CHAN2               2
25#define WPAD_CHAN3               3
26
27#define WPAD_DEV_CORE             0
28#define WPAD_DEV_FREESTYLE        1
29#define WPAD_DEV_CLASSIC           2
30#define WPAD_DEV_NOT_FOUND        253
31#define WPAD_DEV_UNKNOWN        255
32
33#define WPAD_ERR_NONE             0
34#define WPAD_ERR_NO_CONTROLLER   -1
35#define WPAD_ERR_BUSY            -2
36#define WPAD_ERR_TRANSFER        -3
37
38s32  WPADProbe( s32 chan, u32 *type );
39</CODE></pre>
40  </dd>
41</dl>
42
43<h2>Arguments</h2>
44<TABLE border="1" >
45  <tr>
46<TD><code><b><i>chan</i></b></code></TD>
47<TD>One of <code>WPAD_CHAN<i>n</i></code> values.</TD>
48    </tr>
49  <tr>
50<TD><code><b><i>type</i></b></code></TD>
51<TD>Pointer to the variable for getting the controller type.</TD>
52    </tr>
53</TABLE>
54<h2>Return Values</h2>
55<p>Returns the error status.</p>
56
57<blockquote>
58Error statuses are defined with the following macro constants.
59      <TABLE border="1" width="500" cellspacing="0.1">
60        <TBODY>
61          <TR>
62<TD width="150"><CODE>WPAD_ERR_NONE</CODE></TD>
63<TD width="350">Communicated successfully with the Wii Remote. The <code><EM><STRONG>type</STRONG></EM></code> variable contains a valid controller type.</TD>
64          </TR>
65          <TR>
66<TD width="150"><CODE>WPAD_ERR_NO_CONTROLLER</CODE></TD>
67<TD width="350">The Wii Remote is not connected. The <code><EM><STRONG>type</STRONG></EM></code> variable does not contain a valid controller type (undefined).
68            </TD>
69          </TR>
70          <TR>
71<TD width="150"><CODE>WPAD_ERR_BUSY</CODE></TD>
72<TD width="350">Processing is occurring for the Wii Remote. The <code><EM><STRONG>type</STRONG></EM></code> variable does not contain a valid controller type (undefined).
73          </TR>
74          <TR>
75<TD width="150"><CODE>WPAD_ERR_TRANSFER</CODE></TD>
76<TD width="350">A problem occurred during prior communications. The <code><EM><STRONG>type</STRONG></EM></code> variable does not contain a valid controller type (undefined).
77            </TD>
78          </TR>
79        </TBODY>
80      </TABLE>
81</blockquote>
82<H2>Description</H2>
83<P>Checks the specified channel's controller type.</P>
84<blockquote>
85Controller types are defined with the following macro constants.
86      <TABLE border="1" width="500" cellspacing="0.1">
87        <TBODY>
88          <TR>
89<TD width="150"><CODE>WPAD_DEV_NOT_FOUND</CODE></TD>
90<TD width="350">Nothing is connected to the specified channel.</TD>
91          </TR>
92          <TR>
93<TD width="150"><CODE>WPAD_DEV_CORE</CODE></TD>
94<TD width="350">Wii Remote.</TD>
95          </TR>
96          <TR>
97<TD width="150"><CODE>WPAD_DEV_FREESTYLE</CODE></TD>
98<TD width="350">Nunchuk Style.</TD>
99          </TR>
100          <TR>
101<TD width="150"><CODE>WPAD_DEV_CLASSIC</CODE></TD>
102<TD width="350">Classic Style.
103          </TR>
104          <TR>
105<TD width="150"><CODE>WPAD_DEV_UNKNOWN</CODE></TD>
106<TD width="350">Unknown device.
107            </TD>
108          </TR>
109        </TBODY>
110      </TABLE>
111</blockquote>
112
113<h2>See Also</h2>
114<p>
115<A href="./toc.html" target="contents"><CODE>WPAD Functions</CODE></A><br>
116</p>
117
118<H2>Revision History</H2>
119<P>
12006/19/2006 Added WPAD_DEV_CLASSIC to controller types, revised error status.<br>10/27/2005 Initial version.<br>
121</p>
122<hr>
123<P>CONFIDENTIAL</p>
124</BODY>
125</HTML>
126