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=utf-8">
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<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/wpad.h&gt;
19#include &lt;revolution/wpadBalance.h&gt;
20#include &lt;revolution/wpadGuitar.h&gt;
21#include &lt;revolution/wpadDrum.h&gt;
22#include &lt;revolution/wpadTaiko.h&gt;
23#include &lt;revolution/wpadTrain.h&gt;
24
25#define WPAD_CHAN0                    0
26#define WPAD_CHAN1                    1
27#define WPAD_CHAN2                    2
28#define WPAD_CHAN3                    3
29
30#define WPAD_DEV_CORE                 0
31#define WPAD_DEV_FREESTYLE            1
32#define WPAD_DEV_CLASSIC              2
33#define WPAD_DEV_BALANCE_CHECKER      3
34#define WPAD_DEV_MPLS                 5
35#define WPAD_DEV_MPLS_FREESTYLE       6
36#define WPAD_DEV_MPLS_CLASSIC         7
37#define WPAD_DEV_TRAIN               16
38#define WPAD_DEV_GUITAR              17
39#define WPAD_DEV_DRUM                18
40#define WPAD_DEV_TAIKO               19
41#define WPAD_DEV_MPLS_FUTURE        250
42#define WPAD_DEV_FUTURE             251
43#define WPAD_DEV_NOT_SUPPORTED      252
44#define WPAD_DEV_NOT_FOUND          253
45#define WPAD_DEV_UNKNOWN            255
46
47#define WPAD_ERR_NONE                 0
48#define WPAD_ERR_NO_CONTROLLER       -1
49#define WPAD_ERR_BUSY                -2
50
51s32  WPADProbe( s32 chan, u32 *type );
52</pre></dd></dl>
53
54<h2>Arguments</h2>
55<TABLE class="arguments" border="1" >
56  <tr>
57<TH>chan</TH>
58<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD>
59  </tr>
60  <tr>
61<TH>type</TH>
62<TD>Pointer to the variable for getting the controller type.</TD>
63  </tr>
64</TABLE>
65
66<h2>Return Values</h2>
67<p>Returns the error status.</p>
68
69<blockquote>
70Error statuses are defined with the following macro constants.
71      <TABLE class="arguments" border="1" >
72        <TBODY>
73          <TR>
74<TH>WPAD_ERR_NONE</TH>
75<TD>Communicated successfully with the Wii Remote. The <SPAN class="argument">type</SPAN> variable contains a valid device type.</TD>
76          </TR>
77          <TR>
78<TH>WPAD_ERR_NO_CONTROLLER</TH>
79<TD>Indicates the Wii Remote is not connected. The <SPAN class="argument">type</SPAN> variable does not contain a valid device type (it is undefined).</TD>
80          </TR>
81          <TR>
82<TH>WPAD_ERR_BUSY</TH>
83<TD>Processing is being carried out for the Wii Remote. The <SPAN class="argument">type</SPAN> variable does not contain a valid device type (it is undefined).</TR>
84        </TBODY>
85      </TABLE>
86</blockquote>
87
88<H2>Description</H2>
89<P>Checks the device type of the specified channel.</P>
90<blockquote>
91Controller types are defined with the following macro constants.
92      <TABLE class="arguments" border="1" >
93        <TBODY>
94          <TR>
95<TH>WPAD_DEV_NOT_FOUND</TH>
96<TD>Nothing is connected to the specified channel.</TD>
97          </TR>
98          <TR>
99<TH>WPAD_DEV_CORE</TH>
100<TD>Wii Remote.</TD>
101          </TR>
102          <TR>
103<TH>WPAD_DEV_FREESTYLE</TH>
104<TD>Nunchuk Style.</TD>
105          </TR>
106          <TR>
107<TH>WPAD_DEV_CLASSIC</TH>
108<TD>Classic Style.</TD>
109          </TR>
110          <TR>
111<TH>WPAD_DEV_TRAIN</TH>
112<TD>Wii Remote + Master Controller. <font color="red">If the WPADTrn library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD>
113          </TR>
114          <TR>
115<TH>WPAD_DEV_GUITAR</TH>
116<TD>Wii Remote + Guitar Controller. <font color="red">If the WPADGtr library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD>
117          </TR>
118          <TR>
119<TH>WPAD_DEV_DRUM</TH>
120<TD>Wii Remote + Drum Controller. <font color="red">If the <code>WPADDrm</code> library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD>
121          </TR>
122          <TR>
123<TH>WPAD_DEV_TAIKO</TH>
124<TD>Wii Remote + Taiko Drum Controller. <font color="red"> If the <code>WPADTko</code> library is not linked, the device is recognized as <code>WPAD_DEV_FUTURE</code>.</font></TD>
125          </TR>
126          <TR>
127<TH>WPAD_DEV_BALANCE_CHECKER</TH>
128<TD>Wii Balance Board. <font color="red">If the WUD library is not linked, a Wii Balance Board is not connected.</font></TD>
129          </TR>
130          <TR>
131<TH>WPAD_DEV_MPLS</TH>
132<TD>MotionPlus Style.</TD>
133          </TR>
134          <TR>
135<TH>WPAD_DEV_MPLS_FREESTYLE</TH>
136<TD>Nunchuk/MotionPlus Style.</TD>
137          </TR>
138          <TR>
139<TH>WPAD_DEV_MPLS_CLASSIC</TH>
140<TD>Classic/MotionPlus Style. <font color="red">Not supported by Wii MotionPlus PP2.</font></TD>
141          </TR>
142          <TR>
143<TH>WPAD_DEV_MPLS_FUTURE</TH>
144<TD>Status when a device other than a Nunchuk or Classic Controller has been plugged into the Wii MotionPlus while it is operating in extension mode. <font color="red">Not supported by Wii MotionPlus PP2.</font></TD>
145          </TR>
146          <TR>
147<TH>WPAD_DEV_FUTURE</TH>
148<TD>A device that will be supported in the future. The device is legitimate, but this External Extension Controller cannot be used with this title. It can be operated as a Wii Remote.</TD>
149          </TR>
150          <TR>
151<TH>WPAD_DEV_NOT_SUPPORTED</TH>
152<TD>A device that cannot be used. This type is selected when an illegal device is plugged in or device recognition fails due to a poor connection with the external extension controller. It can be operated as a Wii Remote.</TD>
153          </TR>
154          <TR>
155<TH>WPAD_DEV_UNKNOWN</TH>
156<TD>Unknown device. This type is selected during the period between insertion of an External Extension Controller and completion of the recognition process. It can be operated as a Wii Remote.</TD>
157          </TR>
158        </TBODY>
159      </TABLE>
160</blockquote>
161<p>
162You can also get the device type by using the <a href="./WPADSetExtensionCallback.html"><code>WPADSetExtensionCallback</code></a> function. The <a href="./WPADSetExtensionCallback.html"><code>WPADSetExtensionCallback</code></a> function registers a callback that sends notification of the new device type when the controller type has changed, so you can expect a lighter processing load than when the <code>WPADProbe</code> function is used to perform polling.
163</p>
164<p>
165<B>Note:</B><br>If the operating mode of the Wii MotionPlus is obtained with the <a href="./WPADGetMplsStatus.html"><code>WPADGetMplsStatus</code></a> function, the device type obtained with this function may be incorrect. For example, even if the operating mode is <code>WPAD_MPLS_STD</code>, the <code>WPAD_DEV_MPLS_FREESTYLE</code> device type results if a Nunchuk is plugged into the Wii MotionPlus. Even if the device type is <code>WPAD_DEV_MPLS_FREESTYLE</code>, the operating mode remains <code>WPAD_MPLS_STD</code> and only data for the Wii MotionPlus is sent to the Wii console.
166</p>
167
168<h2>See Also</h2>
169<p class="reference">
170<!--<A href="./toc.html" target="contents"><CODE>WPAD関数</CODE></A>, --> <a href="./WPADSetExtensionCallback.html">WPADSetExtensionCallback</a>
171</p>
172
173<H2>Revision History</H2>
174<P>
1752008/12/26 Added <code>WPAD_DEV_TAIKO</code>.<br>2008/12/19 Added <code>WPAD_DEV_DRUM</code>.<br> 2008/12/15 Added notes.<br> 2008/11/26 Revised the description of device types.<br>2008/09/30 Added a description of <CODE>WPAD_DEV_MPLS_CLASSIC</code> and <code>WPAD_DEV_MPLS_FUTURE</code>.<br>2008/07/22 Added a description of <CODE>WPAD_DEV_MPLS_FREESTYLE</code>.<br>2008/07/18 Added a description of <CODE>WPAD_DEV_MPLS</code>.<br>2008/04/16 Deleted <CODE>WPAD_ERR_TRANSFER</CODE>. Added <CODE>WPAD_DEV_TRAIN</CODE>, <CODE>WPAD_DEV_GUITAR</CODE>, and <CODE>WPAD_DEV_BALANCE_CHECKER</CODE>.<br>2008/03/17 Revised the description of <CODE>WPAD_DEV_NOT_SUPPORTED</CODE>.<br>2007/05/02 Added an explanation for the <code>WPADSetExtensionCallback</code> function.<br> 2006/09/06 Added <CODE>WPAD_DEV_FUTURE</CODE> and <CODE>WPAD_DEV_NOT_SUPPORTED</CODE> to the device types.<br> 2006/06/19 Added <CODE>WPAD_DEV_CLASSIC</CODE> to the device types and revised the error status.<br>2005/10/27 Initial version.
176</p>
177
178<hr><p>CONFIDENTIAL</p></body>
179</html>
180