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>WPADControlDpd</title> 10</head> 11 12<body> 13 14<h1>WPADControlDpd</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_DPD_OFF 0 28#define WPAD_DPD_STD 1 29#define WPAD_DPD_EXP 3 30#define WPAD_DPD_FULL 5 31 32typedef void (*WPADCallback) ( s32 chan, s32 result ); 33 34s32 WPADControlDpd( s32 chan, u32 command, WPADCallback callback );</code></pre> 35 </dd> 36</dl> 37 38<h2>Arguments</h2> 39<TABLE border="1"> 40 <TBODY> 41 <TR> 42<TD width="120" bgcolor="#ffffe8"><code><b><i>chan</i></b></code></TD> 43<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD> 44 </TR> 45 <TR> 46<TD width="120" bgcolor="#ffffe8"><CODE><b><i>pattern</i></b></CODE></TD> 47<TD>One of the following: <code>WPAD_DPD_OFF</code>, <code>WPAD_DPD_STD</code>, W<code>PAD_DPD_EXP</code>, or <code>WPAD_DPD_FULL</code>.</TD> 48 </TR> 49 <TR> 50<TD width="120" bgcolor="#ffffe8"><CODE><b><i>callback</i></b></CODE></TD> 51<TD>Callback function to notify about the result. Notification processing is omitted if NULL is specified.</TD> 52 </TR> 53 </TBODY> 54</TABLE> 55<h2>Return Values</h2> 56<p> 57Returns one of the following codes: 58</p> 59<p> 60<code>WPAD_ERR_NONE</code><br> <code>WPAD_ERR_NO_CONTROLLER</code><br> <code>WPAD_ERR_BUSY</code><br> 61</P> 62<H2>Description</H2> 63<p>Controls the pointer for the specified Wii Remote.</p> 64<p> 65This function registers the pointer control command in the WPAD library. The WPAD library processes registered commands when other commands are not running. 66</p> 67<ul> 68<li>Commands</li> 69</ul> 70<p> 71The different commands are defined as follows. When changing from standard to expanded mode, or the reverse, there is no need to halt the pointer. 72</p> 73<table border="1"> 74<tr> 75<td><code>WPAD_DPD_OFF</code></td> 76<td>Halts the pointer.</td> 77</tr> 78<tr> 79<td><code>WPAD_DPD_STD</code></td> 80<td>Starts the pointer in standard mode. Only object coordinates are valid in standard mode. A fixed value is returned for object size. When using the pointer and the external extension controller data, please be certain to run it in this mode.</td> 81</tr> 82<tr> 83<td><code>WPAD_DPD_EXP</code></td> 84<td>Launches the pointer in expanded mode. Both object coordinates and size are valid in expanded mode. To use this mode, specify <code>WPAD_CORE_ACC_DPD</code> in the <a href="./WPADSetDataFormat.html"><code>WPADSetDataFormat</code></a> function.</td> 85</tr> 86<tr> 87<td><code>WPAD_DPD_FULL</code></td> 88<td>Launches the pointer in full mode. In full mode, the object coordinates, size, object radius, pixel value, and object range are valid, but the data rate is half the normal rate. In this mode, an external extension controller cannot be used.</td> 89</tr> 90</table> 91<ul> 92<li>Error Codes</li> 93</ul> 94<p> 95The different return values have the following meanings: 96</p> 97<table border="1"> 98<tr> 99<td><code>WPAD_ERR_NONE</code></td> 100<td>The WPAD library received a command.</td> 101</tr> 102<tr> 103<td><code>WPAD_ERR_BUSY</code></td> 104<td>The WPAD library was unable to receive a command. Call it again after a while.</td> 105</tr> 106<tr> 107<td><code>WPAD_ERR_NO_CONTROLLER</code></td> 108<td>The connection was broken.</td> 109</tr> 110</table> 111 112<ul> 113<li>Callbacks</li> 114</ul> 115<p> 116In addition, if a callback function is set, the callback function returns the following error codes when the processing is complete. Their meanings are as follows: 117</p> 118<table border="1"> 119<tr> 120<td><code>WPAD_ERR_NONE</code></td> 121<td>The command was processed normally.</td> 122</tr> 123<tr> 124<td><code>WPAD_ERR_BUSY</code></td> 125<td>The WPAD library was unable to receive a command. Call it again later.</td> 126</tr> 127<tr> 128<td><code>WPAD_ERR_TRANSFER</code></td> 129<td>A communications error prevented normal processing of the command.</td> 130</tr> 131<tr> 132<td><code>WPAD_ERR_NO_CONTROLLER</code></td> 133<td>The connection was broken.</td> 134</tr> 135</table> 136 137<h2>See Also</h2> 138<p> 139<A href="./toc.html" target="contents">WPAD Functions</A><br> <A href="./WPADIsDpdEnabled.html"><CODE>WPADIsDpdEnabled</CODE></A>, <a href="./WPADSetDataFormat.html"><code>WPADSetDataFormat</code></a><br> 140</p> 141 142<H2>Revision History</H2> 143<P> 1442006/11/29 Added <CODE>WPAD_ERR_BUSY</CODE>, which had been left out from the list, to the error codes passed by the callback.<br>2006/08/15 Added DPD full mode.<br>2006/06/19 Initial version. <br> 145</P> 146 147<hr> 148<P>CONFIDENTIAL</p> 149</BODY> 150</HTML>