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<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/wpad.h> 19#include <revolution/wpadBalance.h> 20#include <revolution/wpadGuitar.h> 21#include <revolution/wpadTrain.h> 22 23#define WPAD_CHAN0 0 24#define WPAD_CHAN1 1 25#define WPAD_CHAN2 2 26#define WPAD_CHAN3 3 27 28#define WPAD_DEV_CORE 0 29#define WPAD_DEV_FREESTYLE 1 30#define WPAD_DEV_CLASSIC 2 31#define WPAD_DEV_BALANCE_CHECKER 3 32#define WPAD_DEV_TRAIN 16 33#define WPAD_DEV_GUITAR 17 34#define WPAD_DEV_FUTURE 251 35#define WPAD_DEV_NOT_SUPPORTED 252 36#define WPAD_DEV_NOT_FOUND 253 37#define WPAD_DEV_UNKNOWN 255 38 39#define WPAD_ERR_NONE 0 40#define WPAD_ERR_NO_CONTROLLER -1 41#define WPAD_ERR_BUSY -2 42 43s32 WPADProbe( s32 chan, u32 *type ); 44</pre></dd></dl> 45 46<h2>Arguments</h2> 47<TABLE class="arguments" border="1" > 48 <tr> 49<TH>chan</TH> 50<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD> 51 </tr> 52 <tr> 53<TH>type</TH> 54<TD>Pointer to the variable for getting the controller type.</TD> 55 </tr> 56</TABLE> 57 58<h2>Return Values</h2> 59<p>Returns the error status.</p> 60 61<blockquote> 62Error statuses are defined with the following macro constants. 63 <TABLE class="arguments" border="1" > 64 <TBODY> 65 <TR> 66<TH>WPAD_ERR_NONE</TH> 67<TD>Communicated successfully with the Wii Remote. The <SPAN class="argument">type</SPAN> variable contains a valid controller type.</TD> 68 </TR> 69 <TR> 70<TH>WPAD_ERR_NO_CONTROLLER</TH> 71<TD>Indicates the Wii Remote is not connected. The <SPAN class="argument">type</SPAN> variable does not contain a valid controller type (undefined).</TD> 72 </TR> 73 <TR> 74<TH>WPAD_ERR_BUSY</TH> 75<TD>Processing is being carried out for the Wii Remote. The <SPAN class="argument">type</SPAN> variable does not contain a valid controller type (undefined).</TR> 76 </TBODY> 77 </TABLE> 78</blockquote> 79 80<H2>Description</H2> 81<P>Checks the specified channel's controller type.</P> 82<blockquote> 83Controller types are defined with the following macro constants. 84 <TABLE class="arguments" border="1" > 85 <TBODY> 86 <TR> 87<TH>WPAD_DEV_NOT_FOUND</TH> 88<TD>Nothing is connected to the specified channel.</TD> 89 </TR> 90 <TR> 91<TH>WPAD_DEV_CORE</TH> 92<TD>Wii Remote.</TD> 93 </TR> 94 <TR> 95<TH>WPAD_DEV_FREESTYLE</TH> 96<TD>Nunchuk Style.</TD> 97 </TR> 98 <TR> 99<TH>WPAD_DEV_CLASSIC</TH> 100<TD>Classic Style.</TD> 101 </TR> 102 <TR> 103<TH>WPAD_DEV_TRAIN</TH> 104<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> 105 </TR> 106 <TR> 107<TH>WPAD_DEV_GUITAR</TH> 108<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> 109 </TR> 110 <TR> 111<TH>WPAD_DEV_BALANCE_CHECKER</TH> 112<TD>Wii Balance Board. <font color="red">If the WUD library is not linked, a Wii Balance Board is not connected.</font></TD> 113 </TR> 114 <TR> 115<TH>WPAD_DEV_FUTURE</TH> 116<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> 117 </TR> 118 <TR> 119<TH>WPAD_DEV_NOT_SUPPORTED</TH> 120<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> 121 </TR> 122 <TR> 123<TH>WPAD_DEV_UNKNOWN</TH> 124<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> 125 </TR> 126 </TBODY> 127 </TABLE> 128</blockquote> 129<p> 130The controller type can also be obtained by using the <a href="./WPADSetExtensionCallback.html"><code>WPADSetExtensionCallback</code></a> function. <br>Because the <a href="./WPADSetExtensionCallback.html"><code>WPADSetExtensionCallback</code></a> function registers a callback that sends notification of the new controller type when the controller type has changed, you can expect a lighter processing load than when the <code>WPADProbe</code> function performs polling. 131</p> 132 133<h2>See Also</h2> 134<p class="reference"> 135<a href="./WPADSetExtensionCallback.html">WPADSetExtensionCallback</a> 136</p> 137 138<H2>Revision History</H2> 139<P> 1402008/11/26 Revised the description of controller types.<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 controller types.<br>2006/06/19 Added <CODE>WPAD_DEV_CLASSIC</CODE> to the controller types and revised the error status.<br>2005/10/27 Initial version. 141</p> 142 143<hr><p>CONFIDENTIAL</p></body> 144</html> 145