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 http-equiv="Content-Style-Type" content="text/css"> 6<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 7<TITLE>WPADGetInfo</TITLE> 8</HEAD> 9<BODY> 10 11<H1>WPADGetInfo</H1> 12 13<H2>Syntax</H2> 14<dl><dd><pre class="construction">#include <revolution/wpad.h> 15 16#define WPAD_CHAN0 0 17#define WPAD_CHAN1 1 18#define WPAD_CHAN2 2 19#define WPAD_CHAN3 3 20 21#define WPAD_BATTERY_LEVEL_CRITICAL 0 22#define WPAD_BATTERY_LEVEL_LOW 1 23#define WPAD_BATTERY_LEVEL_MEDIUM 2 24#define WPAD_BATTERY_LEVEL_HIGH 3 25#define WPAD_BATTERY_LEVEL_MAX 4 26 27#define WPAD_LED_CHAN_1 0x1 28#define WPAD_LED_CHAN_2 0x2 29#define WPAD_LED_CHAN_3 0x4 30#define WPAD_LED_CHAN_4 0x8 31 32 33typedef struct WPADInfo 34{ 35 BOOL dpd; 36 BOOL speaker; 37 BOOL attach; 38 BOOL lowBat; 39 BOOL nearempty; 40 u8 battery; 41 u8 led; 42 u8 protocol; 43 u8 firmware; 44} 45 46s32 WPADGetInfo( s32 chan, WPADInfo *info ); 47</pre></dd></dl> 48 49<H2>Arguments</H2> 50<TABLE class="arguments" border="1" > 51 <TBODY> 52 <TR> 53<TH>chan</TH> 54<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD> 55 </TR> 56 <TR> 57<TH>info</TH> 58<TD>A pointer to <code>WPADInfo</code> that copies the obtained information.</TD> 59 </TR> 60 </TBODY> 61</TABLE> 62 63<H2>Return Values</H2> 64<p> 65Returns one of the following codes: 66</p> 67<p> 68<code>WPAD_ERR_NONE</code><br> 69<code>WPAD_ERR_NO_CONTROLLER</code><br> 70<code>WPAD_ERR_BUSY</code><br> 71<code>WPAD_ERR_TRANSFER</code> 72 73</P> 74<H2>Description</H2> 75<p> 76Gets the status of the Wii Remote for the specified channel. This function registers a status-requesting command to the WPAD library and waits for the WPAD library to complete its processes. 77</p> 78 79<p> 80Can get the following status types. 81</p> 82<TABLE class="arguments" border="1" > 83<tr><th>dpd</th><td>The Pointer's operational status.</td> 84<tr><th>speaker</th><td>The speaker's operational status.</td> 85<tr><th>attach</th><td>External extension controller connection status.</td> 86<tr><th>lowBat</th><td>Whether the indicator brightness is dropping. Voltages that change the indicator brightness exhibit hysteresis. Note that the brightness will drop when the battery level reaches <code>WPAD_BATTERY_LEVEL_LOW</code>, but the brightness will not be restored immediately even if the battery level changes to <code>WPAD_BATTERY_LEVEL_MEDIUM</code> afterwards.</td> 87<tr><th>nearempty</th><td>Whether there is a small amount of audio data left in the sound buffer.</td> 88<tr><th>battery</th><td>The battery level, indicated on a scale of five (<code>WPAD_BATTERY_LEVEL_*</code>). Indicates how much battery charge currently remains.</td> 89<tr><th>led</th><td>The illumination status (<code>WPAD_LED_CHAN_*</code>) of the four Player Indicators.</td> 90<tr><th>protocol</th><td>Not used.</td> 91<tr><th>firmware</th><td>Not used.</td> 92</table> 93<p> 94The return values have the following meanings: 95</p> 96<TABLE class="arguments" border="1" > 97<tr><th>WPAD_ERR_NONE</th><td>Status was retrieved normally.</td> 98<tr><th>WPAD_ERR_BUSY</th><td>The WPAD library was unable to receive a command.</td> 99<tr><th>WPAD_ERR_NO_CONTROLLER</th><td>The connection was broken.</td> 100<tr><th>WPAD_ERR_TRANSFER</th><td>A communications error prevented normal processing of the command.</td> 101</table> 102<p> 103<STRONG>Note:</STRONG><br> This function may put the current thread to sleep. Refer to Interrupts and Callback Functions. 104</p> 105 106<H2>See Also</H2> 107<p class="reference"> 108<A href="./WPADGetInfoAsync.html">WPADGetInfoAsync</A>, 109<a href="./WPADInfo.html">WPADInfo</a>, 110<a href="../os/Interrupt/intro.html"><code>���荞�݂ƃR�[���o�b�N��</code></a> 111</p> 112 113<H2>Revision History</H2> 114<p> 1152008/07/08 Added explanations related to <span class="argument">lowBat</span> and <span class="argument">battery</span>.<br>2007/09/18 Added <SPAN class="argument">nearempty</SPAN> to <CODE>WPADInfo</CODE>.<br>2007/09/11 Added a note related to Interrupts and Callback Functions.<br> 2006/09/06 Added <CODE>WPAD_BATTERY_LEVEL_CRITICAL</CODE>.<br>2006/08/15 Added <CODE>WPADInfo</CODE> to See Also.<br>2006/06/19 Initial version.<br> 116</p> 117<hr><p>CONFIDENTIAL</p></body> 118</HTML>