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 <revolution/wpad.h> 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_FUTURE 251 31#define WPAD_DEV_NOT_SUPPORTED 252 32#define WPAD_DEV_NOT_FOUND 253 33#define WPAD_DEV_UNKNOWN 255 34 35#define WPAD_ERR_NONE 0 36#define WPAD_ERR_NO_CONTROLLER -1 37#define WPAD_ERR_BUSY -2 38#define WPAD_ERR_TRANSFER -3 39 40s32 WPADProbe( s32 chan, u32 *type ); 41</CODE></pre> 42 </dd> 43</dl> 44 45<h2>Arguments</h2> 46<TABLE border="1" > 47 <tr> 48<TD width="120" bgcolor="#ffffe8"><code><b><i>chan</i></b></code></TD> 49<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD> 50 </tr> 51 <tr> 52<TD width="120" bgcolor="#ffffe8"><code><b><i>type</i></b></code></TD> 53<TD>Pointer to the variable used for getting the controller type.</TD> 54 </tr> 55</TABLE> 56<h2>Return Values</h2> 57<p>Returns the error status.</p> 58 59<blockquote> 60Error statuses are defined with the following macro constants. 61 <TABLE border="1" width="500" cellspacing="0.1"> 62 <TBODY> 63 <TR> 64<TD width="150"><CODE>WPAD_ERR_NONE</CODE></TD> 65<TD width="350">Communicated successfully with the Wii Remote. The <code>type</code> variable contains a valid controller type.</TD> 66 </TR> 67 <TR> 68<TD width="150"><CODE>WPAD_ERR_NO_CONTROLLER</CODE></TD> 69<TD width="350">The Wii Remote is not connected. The <code>type</code> variable does not contain a valid controller type (undefined). 70 </TD> 71 </TR> 72 <TR> 73<TD width="150"><CODE>WPAD_ERR_BUSY</CODE></TD> 74<TD width="350">Processing is occurring for the Wii Remote. The <code>type</code> variable does not contain a valid controller type (undefined). 75 </TR> 76 <TR> 77<TD width="150"><CODE>WPAD_ERR_TRANSFER</CODE></TD> 78<TD width="350">A problem occurred during prior communications. The <code>type</code> variable does not contain a valid controller type (undefined). 79 </TD> 80 </TR> 81 </TBODY> 82 </TABLE> 83</blockquote> 84<H2>Description</H2> 85<P>Checks the specified channel's controller type.</P> 86<blockquote> 87Controller types are defined with the following macro constants. 88 <TABLE border="1" width="500" cellspacing="0.1"> 89 <TBODY> 90 <TR> 91<TD width="150"><CODE>WPAD_DEV_NOT_FOUND</CODE></TD> 92<TD width="350">Nothing is connected to the specified channel.</TD> 93 </TR> 94 <TR> 95<TD width="150"><CODE>WPAD_DEV_CORE</CODE></TD> 96<TD width="350">Wii Remote.</TD> 97 </TR> 98 <TR> 99<TD width="150"><CODE>WPAD_DEV_FREESTYLE</CODE></TD> 100<TD width="350">Nunchuk Style.</TD> 101 </TR> 102 <TR> 103<TD width="150"><CODE>WPAD_DEV_CLASSIC</CODE></TD> 104<TD width="350">Classic Style. 105 </TR> 106 <TR> 107<TD width="150"><CODE>WPAD_DEV_FUTURE</CODE></TD> 108<TD width="350">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 may be operated as a Wii Remote.<BR> 109 </TR> 110 <TR> 111<TD width="150"><CODE>WPAD_DEV_NOT_SUPPORTED</CODE></TD> 112<TD width="350">A device that cannot be used. This type is selected when device recognition fails or an illegal device is plugged in. It may be operated as a Wii Remote.<BR> 113 </TR> 114 <TR> 115<TD width="150"><CODE>WPAD_DEV_UNKNOWN</CODE></TD> 116<TD width="350">Unknown device. This type is selected during the period between insertion of an External Extension Controller and completion of the recognition process. It may be operated as a Wii Remote.<BR> 117 </TD> 118 </TR> 119 </TBODY> 120 </TABLE> 121</blockquote> 122<p> 123The controller type can be also obtained 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 function for notifying about the changed controller type, you can expect a lighter load than when you poll using the <a href="./WPADProbe.html"><code>WPADProbe</code></a> function. 124</p> 125 126<h2>See Also</h2> 127<p> 128<A href="./toc.html" target="contents">WPAD Function</A><br> <a href="./WPADSetExtensionCallback.html"><code>WPADSetExtensionCallback</code></a><br> 129</p> 130 131<H2>Revision History</H2> 132<P> 1332007/05/02 2007/05/02 Added a description for the <a href="./WPADSetExtensionCallback.html"><code>WPADSetExtensionCallback</code></a> 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.<br> 134</p> 135<hr><p>CONFIDENTIAL</p></body> 136</html> 137