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><code><b><i>chan</i></b></code></TD> 43<TD>One of <code>WPAD_CHAN<i>n</i></code> values.</TD> 44 </TR> 45 <TR> 46<TD><CODE><b><i>pattern</i></b></CODE></TD> 47<TD><code>Either WPAD_DPD_OFF, WPAD_DPD_STD or WPAD_DPD_EXP.</code></TD> 48 </TR> 49 <TR> 50<TD><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<p> 70The different commands are defined as follows. When changing from standard to expanded mode, or the reverse, there is no need to halt the pointer. 71<table border="1"> 72<tr> 73<td><code>WPAD_DPD_OFF</code></td> 74<td>Halts the pointer.</td> 75</tr> 76<tr> 77<td><code>WPAD_DPD_STD</code></td> 78<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> 79</tr> 80<tr> 81<td><code>WPAD_DPD_EXP</code></td> 82<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> 83</tr> 84<tr> 85<td><code>WPAD_DPD_FULL</code></td> 86<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> 87</tr> 88</table> 89</p> 90<li>Error Codes</li> 91<p> 92The different return values have the following meanings: 93<table border="1"> 94<tr> 95<td><code>WPAD_ERR_NONE</code></td> 96<td>The WPAD library received a command.</td> 97</tr> 98<tr> 99<td><code>WPAD_ERR_BUSY</code></td> 100<td>The WPAD library was unable to receive a command. Call it again after a while.</td> 101</tr> 102<tr> 103<td><code>WPAD_ERR_NO_CONTROLLER</code></td> 104<td>The connection was broken.</td> 105</tr> 106</table> 107</p> 108<li>Callbacks</li> 109<p> 110In 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: 111<table border="1"> 112<tr> 113<td><code>WPAD_ERR_NONE</code></td> 114<td>The command was processed normally.</td> 115</tr> 116<tr> 117<td><code>WPAD_ERR_TRANSFER</code></td> 118<td>A communications error prevented normal processing of the command.</td> 119</tr> 120<tr> 121<td><code>WPAD_ERR_NO_CONTROLLER</code></td> 122<td>The connection was broken.</td> 123</tr> 124</table> 125</p> 126</ul> 127 128<h2>See Also</h2> 129<p> 130<A href="./toc.html" target="contents"><CODE>WPAD</CODE> Functions</A><br> <A href="./WPADIsDpdEnabled.html"><CODE>WPADIsDpdEnabled</CODE></A><br> <a href="./WPADSetDataFormat.html"><code>WPADSetDataFormat</code></a><br> 131</p> 132 133<H2>Revision History</H2> 134<P> 13508/15/2006 Described the DPD full mode.<br> 2006/06/19 Initial version.<br> 136</P> 137 138<hr> 139<P>CONFIDENTIAL</p> 140</BODY> 141</HTML>