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>WPADInfo</title> 9</head> 10 11<body> 12 13 14<h1>WPADInfo</h1> 15 16 17<H2>C Specification</H2> 18<DL> 19 <DD> 20 <PRE><CODE>#include <revolution/wpad.h></CODE></PRE> 21 <DD> 22 <PRE><CODE> 23#define WPAD_BATTERY_LEVEL_CRITICAL 0 24#define WPAD_BATTERY_LEVEL_LOW 1 25#define WPAD_BATTERY_LEVEL_MEDIUM 2 26#define WPAD_BATTERY_LEVEL_HIGH 3 27#define WPAD_BATTERY_LEVEL_MAX 4 28 29#define WPAD_LED_CHAN_1 0x1 30#define WPAD_LED_CHAN_2 0x2 31#define WPAD_LED_CHAN_3 0x4 32#define WPAD_LED_CHAN_4 0x8 33 34typedef struct WPADInfo 35{ 36<table> 37 <tr><td width="75"><code>BOOL</code></td><td><code> dpd;</code></td></tr> 38 <tr><td width="75"><code>BOOL</code></td><td><code> speaker;</code></td></tr> 39 <tr><td width="75"><code>BOOL</code></td><td><code> attach;</code></td></tr> 40 <tr><td width="75"><code>BOOL</code></td><td><code> lowBat;</code></td></tr> 41 <tr><td width="75"><code>u8</code></td><td><code> battery;</code></td></tr> 42 <tr><td width="75"><code>u8</code></td><td><code> led;</code></td></tr> 43 <tr><td width="75"><code>u8</code></td><td><code> protocol;</code></td></tr> 44 <tr><td width="75"><code>u8</code></td><td><code> firmware;</code></td></tr> 45</table> 46} 47</CODE></PRE> 48</DL> 49<H2>Elements</H2> 50<TABLE border="1" cellpadding="3" cellspacing="0.1"> 51 <TBODY> 52<tr><td><code><b><i>dpd</i></b></code></td><td>The pointer's operational status.</td> 53<tr><td><code><b><i>speaker</i></b></code></td><td>The speaker's operational status.</td> 54<tr><td><code><b><i>attach</i></b></code></td><td>External extension controller connection status.</td> 55<tr><td><code><b><i>lowBat</i></b></code></td><td>This indicates whether the battery charge has dropped below a certain level and the indicator has dimmed.</td> 56<tr><td><code><b><i>battery</i></b></code></td><td>The battery level, indicated on a scale of five (<code>WPAD_BATTERY_LEVEL_*</code>).</td> 57<tr><td><code><b><i>led</i></b></code></td><td>The illumination status (<code>WPAD_LED_CHAN_*</code>) of the four Player LEDs.</td> 58<tr><td><code><b><i>protocol</i></b></code></td><td>Not used.</td> 59<tr><td><code><b><i>firmware</i></b></code></td><td>Not used.</td> 60 </TBODY> 61</TABLE> 62 63<h2>Description</h2> 64<p> 65The WPADStatus structure represents the status of the Wii Remote. 66</p> 67<ul> 68<li>The pointer's operational status.</li> 69</ul> 70<blockquote> 71<CODE>TRUE</CODE> is stored when the pointer has been launched with the <a href="./WPADControlDpd.html"><code>WPADControlDpd</code></a> function; <CODE>FALSE</CODE> is stored otherwise. 72</blockquote> 73 74<ul> 75<li>The speaker's operational status.</li> 76</ul> 77<blockquote> 78<CODE>TRUE</CODE> is stored when the speaker has been launched with the <a href="./WPADControlSpeaker.html"><code>WPADControlSpeaker</code></a> function; <CODE>FALSE</CODE> is stored if it is stopped. 79</blockquote> 80 81<ul> 82<li>External extension controller connection status.</li> 83</ul> 84<blockquote> 85<CODE>TRUE</CODE> is stored if an external extension controller is connected; <CODE>FALSE</CODE> is stored otherwise. 86</blockquote> 87 88<ul> 89<li>Remaining Battery Power</li> 90</ul> 91<blockquote> 92Indicates how much battery charge remains in the Wii Remote with <code><i>lowBat</i></code> and <code><i>battery</i></code>. While the Wii Remote is connecting or while it is being registered, the remaining battery charge is displayed with the four Player LEDs. <code><i>battery</i></code> is stored at one of five levels. If <code><i>battery</i></code> is <code>WPAD_BATTERY_LEVEL_LOW</code>, then <i>lowBat</i> becomes <code>TRUE</code>. If <code><i>battery</i></code> is <code><i>WPAD_BATTERY_LEVEL_CRITICAL</i></code>, the battery charge can be recognized as going down quickly. Because the battery charge can vary depending on the type of battery, the remaining operational time may range between 20 seconds to 16 minutes. 93</blockquote> 94 95<ul> 96<li>Player LED</li> 97</ul> 98<blockquote> 99The on/off status of the four Player LEDs for the Wii Remote is stored as a bit pattern. The lowest bit corresponds to the left of the player indicator. 100</blockquote> 101 102<ul> 103<li>Protocol Type</li> 104</ul> 105<blockquote> 106This member is not used. 107</blockquote> 108 109<ul> 110<li>Firmware Version</li> 111</ul> 112<blockquote> 113This member is not used. 114</blockquote> 115 116<H2>See Also</H2> 117<p> 118<A href="./toc.html" target="contents">WPAD Functions</A><br> <a href="./WPADGetInfo.html"><code>WPADGetInfo</code></a>, <a href="./WPADGetInfoAsync.html"><code>WPADGetInfoAsync</a></code><br> 119</p> 120 121 122<H2>Revision History</H2> 123<P> 1242006/09/06 Added WPAD_BATTERY_LEVEL_CRITICAL.<br>2006/08/15 Initial version.<br> 125</P> 126 127<hr> 128<P>CONFIDENTIAL</p> 129</BODY> 130</HTML>