1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8<title>WPADBLStatus</title> 9</head> 10 11<body> 12 13 14<h1>WPADBLStatus</h1> 15 16 17<H2>C Specification</H2> 18<DL> 19 <DD> 20 <PRE> 21<CODE>#include <revolution/wpad.h></CODE> 22<CODE>#include <revolution/wpadBalance.h></CODE> 23 </PRE> 24 <DD> 25 <PRE><CODE> 26#define WPAD_DPD_MAX_OBJECTS 4 27 28#define WPAD_BUTTON_LEFT 0x0001 29#define WPAD_BUTTON_RIGHT 0x0002 30#define WPAD_BUTTON_DOWN 0x0004 31#define WPAD_BUTTON_UP 0x0008 32#define WPAD_BUTTON_PLUS 0x0010 33#define WPAD_BUTTON_2 0x0100 34#define WPAD_BUTTON_1 0x0200 35#define WPAD_BUTTON_B 0x0400 36#define WPAD_BUTTON_A 0x0800 37#define WPAD_BUTTON_MINUS 0x1000 38#define WPAD_BUTTON_HOME 0x8000 39 40#define WPAD_PRESS_UNITS 4 41#define WPAD_DEV_BALANCE_CHECKER 3 42#define WPAD_FMT_BALANCE_CHECKER 12 43 44typedef struct WPADBLStatus 45{ 46 u16 button; 47 s16 accX; 48 s16 accY; 49 s16 accZ; 50 DPDObject obj[WPAD_DPD_MAX_OBJECTS]; 51 52 u8 dev; 53 s8 err; 54 55 u16 press[WPAD_PRESS_UNITS]; 56 s8 temp; 57 u8 battery; 58 59} WPADBLStatus; 60 61 62typedef struct DPDObject 63{ 64 s16 x; 65 s16 y; 66 u16 size; 67 u8 traceId; 68} DPDObject; 69</CODE></PRE> 70</DL> 71<H2>Elements</H2> 72<TABLE border="1" cellpadding="3" cellspacing="0.1"> 73 <TBODY> 74 <tr> 75 <TD><code><b><i>button</i></b></code></TD> 76 <TD>Set to <code>WPAD_BUTTON_A</code> when the Power Button for the Wii Balance Board accessory is being pressed.</TD> 77 </tr> 78 <tr> 79 <TD><code><b><i>accX</i></b></code></TD> 80 <TD>This is an undefined value because the Wii Balance Board accessory does not have a motion sensor.</TD> 81 </tr> 82 <tr> 83 <TD><code><b><i>accY</i></b></code></TD> 84 <TD>This is an undefined value because the Wii Balance Board accessory does not have a motion sensor.</TD> 85 </tr> 86 <tr> 87 <TD><code><b><i>accZ</i></b></code></TD> 88 <TD>This is an undefined value because the Wii Balance Board accessory does not have a motion sensor.</TD> 89 </tr> 90 <tr> 91 <TD><code><b><i>obj[].x</i></b></code></TD> 92 <TD>This is an undefined value because the Wii Balance Board accessory does not have a pointer.</TD> 93 </tr> 94 <tr> 95 <TD><code><b><i>obj[].y</i></b></code></TD> 96 <TD>This is an undefined value because the Wii Balance Board accessory does not have a pointer.</TD> 97 </tr> 98 <tr> 99 <TD><code><b><i>obj[].size</i></b></code></TD> 100 <TD>This is an undefined value because the Wii Balance Board accessory does not have a pointer.</TD> 101 </tr> 102 <tr> 103 <TD><code><b><i>obj[].traceId</i></b></code></TD> 104 <TD>This is an undefined value because the Wii Balance Board accessory does not have a pointer.</TD> 105 </tr> 106 <tr> 107 <TD><code><b><i>dev</i></b></code></TD> 108 <TD>The controller type.</TD> 109 </tr> 110 <TR> 111 <TD width="120" valign="top"><CODE><b><i>err</i></b></CODE></TD> 112 <TD width="520">The controller error status. 113 </TD> 114 </TR> 115 <tr> 116 <TD><code><b><i>press</i></b></code></TD> 117 <TD>The value of the sensors in the four corners of the Wii Balance Board accessory.</TD> 118 </tr> 119 <tr> 120 <TD><code><b><i>temp</i></b></code></TD> 121 <TD>The temperature on the surface of the Wii Balance Board accessory.</TD> 122 </tr> 123 <tr> 124 <TD><code><b><i>battery</i></b></code></TD> 125 <TD>The remaining battery life for the Wii Balance Board accessory.</TD> 126 </tr> 127 </TBODY> 128</TABLE> 129 130 131 132<h2>Description</h2> 133<p> 134A structure that shows the state of the Wii Balance Board accessory. 135</p> 136 137<ul> 138<li>Button Input</li> 139</ul> 140<blockquote> 141Button inputs are defined with the following macro constants. The only button located on the Wii Balance Board accessory is its Power Button. 142<table border="1"> 143<TR> 144<TD width="150"><CODE>WPAD_BUTTON_A</CODE></TD> 145<TD>The Wii Balance Board accessory's Power Button is being pressed.</TD> 146</TR> 147</table> 148</blockquote> 149 150<ul> 151<li>Controller Type</li> 152</ul> 153<blockquote> 154Controller types are defined with the following macro constants. 155 <TABLE border="1" width="500" cellspacing="0.1"> 156 <TBODY> 157 <TR> 158 <TD width="150"><CODE>WPAD_DEV_NOT_FOUND</CODE></TD> 159 <TD width="350">Nothing is connected to the specified channel.</TD> 160 </TR> 161 <TR> 162 <TD width="150"><CODE>WPAD_DEV_CORE</CODE></TD> 163 <TD width="350">Wii Remote controller.</TD> 164 </TR> 165 <TR> 166 <TD width="150"><CODE>WPAD_DEV_FREESTYLE</CODE></TD> 167 <TD width="350">Nunchuk controller Style.</TD> 168 </TR> 169 <TR> 170 <TD width="150"><CODE>WPAD_DEV_CLASSIC</CODE></TD> 171 <TD width="350">Classic Style.<BR> 172 </TR> 173 <TR> 174 <TD width="150"><CODE>WPAD_DEV_BALANCE_CHECKER</CODE></TD> 175 <TD width="350">Wii Balance Board accessory.<BR> 176 </TR> 177 <TR> 178 <TD width="150"><CODE>WPAD_DEV_FUTURE</CODE></TD> 179 <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 controller.<BR> 180 </TR> 181 <TR> 182 <TD width="150"><CODE>WPAD_DEV_NOT_SUPPORTED</CODE></TD> 183 <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 controller.<BR> 184 </TR> 185 <TR> 186 <TD width="150"><CODE>WPAD_DEV_UNKNOWN</CODE></TD> 187 <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 controller.<BR> 188 </TD> 189 </TR> 190 </TBODY> 191 </TABLE> 192</blockquote> 193 194<ul> 195<li>Error Status</li> 196</ul> 197<blockquote> 198Error statuses are defined with the following macro constants. 199 <TABLE border="1" width="500" cellspacing="0.1"> 200 <TBODY> 201 <TR> 202 <TD width="150"><CODE>WPAD_ERR_NONE</CODE></TD> 203 <TD width="350">A Wii Balance Board accessory is connected. The <code>WPADBLStatus</code> structure contains valid data.</TD> 204 </TR> 205 <TR> 206 <TD width="150"><CODE>WPAD_ERR_NO_CONTROLLER</CODE></TD> 207 <TD width="350">A Wii Balance Board accessory is not connected. The <code>WPADBLStatus</code> structure does not contain valid data (structure members other than <CODE><STRONG><EM>err</EM></STRONG></CODE> are undefined). 208 </TD> 209 </TR> 210 <TR> 211 <TD width="150"><CODE>WPAD_ERR_BUSY</CODE></TD> 212 <TD width="350">Processing is being carried out for the Wii Balance Board accessory. Only Wii Balance Board accessory button information in the <code>WPADBLStatus</code> structure is valid.<BR> 213 </TR> 214 <TR> 215 <TD width="150"><CODE>WPAD_ERR_TRANSFER</CODE></TD> 216 <TD width="350">Indicates a problem occurred during communications. The <code>WPADBLStatus</code> structure does not contain valid data (structure members other than <CODE><STRONG><EM>err</EM></STRONG></CODE> are undefined).<BR> 217 </TD> 218 </TR> 219 <TR> 220 <TD width="150"><CODE>WPAD_ERR_INVALID</CODE></TD> 221 <TD width="350">The data format of data received from the Wii Balance Board accessory differs from that set by the <a href="./WPADSetDataFormat.html"><code>WPADSetDataFormat</code></a> function. (Structure members other than <CODE><STRONG><EM>err</EM></STRONG></CODE> are undefined.)</TD> 222 </TR> 223 <TR> 224 <TD width="150"><CODE>WPAD_ERR_CORRUPTED</CODE></TD> 225 <TD width="350">The Wii Balance Board accessory does not return this error.</TD> 226 </TR> 227 </TBODY> 228 </TABLE> 229</blockquote> 230 231<H2>See Also</H2> 232<p> 233<A href="./toc.html" target="contents"><CODE>WPAD Functions</CODE></A><br> 234</p> 235 236 237<H2>Revision History</H2> 238<P> 2392007/11/14 Initial version.<br> 240</P> 241<hr><p>CONFIDENTIAL</p></body> 242</HTML>