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=utf-8">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>WPADGetDataFormat</title>
9</head>
10
11<body>
12
13<h1>WPADGetDataFormat</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/wpad.h&gt;
18#include &lt;revolution/wpadBalance.h&gt;
19#include &lt;revolution/wpadGuitar.h&gt;
20#include &lt;revolution/wpadDrum.h&gt;
21#include &lt;revolution/wpadTaiko.h&gt;
22#include &lt;revolution/wpadTrain.h&gt;
23
24#define WPAD_CHAN0               0
25#define WPAD_CHAN1               1
26#define WPAD_CHAN2               2
27#define WPAD_CHAN3               3
28
29#define WPAD_FMT_CORE                  0
30#define WPAD_FMT_CORE_ACC              1
31#define WPAD_FMT_CORE_ACC_DPD          2
32#define WPAD_FMT_FREESTYLE             3
33#define WPAD_FMT_FREESTYLE_ACC         4
34#define WPAD_FMT_FREESTYLE_ACC_DPD     5
35#define WPAD_FMT_CLASSIC               6
36#define WPAD_FMT_CLASSIC_ACC           7
37#define WPAD_FMT_CLASSIC_ACC_DPD       8
38#define WPAD_FMT_CORE_ACC_DPD_FULL     9
39#define WPAD_FMT_TRAIN                10
40#define WPAD_FMT_GUITAR               11
41#define WPAD_FMT_BALANCE_CHECKER      12
42#define WPAD_FMT_DRUM                 15
43#define WPAD_FMT_MPLS                 16
44#define WPAD_FMT_TAIKO                17
45
46u32 WPADGetDataFormat( s32 chan );
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  </TBODY>
57</TABLE>
58
59<h2>Return Values</h2>
60<p>One of the <code>WPAD_FMT_*</code>.</p>
61
62<H2>Description</H2>
63<p>Obtains the data format of the received data on the specified channel. By default, the Wii Remote data format (<code>WPAD_FMT_CORE</code>) is used for the Wii Remote, and the Wii Balance Board data format (<code>WPAD_FMT_BALANCE_CHECKER</code>) is used for the Wii Balance Board.</p>
64<blockquote>
65Received data formats are defined with the macro constants shown below.
66<TABLE class="arguments" border="1" >
67  <TR>
68<TH>WPAD_FMT_CORE </TH>
69<TD>Wii Remote data format (<a href="./WPADStatus.html"><code>WPADStatus</code></a> structure). Only button information is valid. <font color="#ff0000">Note: Wii Remote default</font></TD>
70  </TR>
71  <TR>
72<TH>WPAD_FMT_CORE_ACC </TH>
73<TD>Wii Remote data format (<a href="./WPADStatus.html"><code>WPADStatus</code></a> structure). The button and motion sensor information is valid.</TD>
74  </TR>
75  <TR>
76<TH>WPAD_FMT_CORE_ACC_DPD </TH>
77<TD>Wii Remote data format (<a href="./WPADStatus.html"><code>WPADStatus</code></a> structure). The button, motion sensor, and pointer information is valid. The pointer has valid size and coordinate data.</TD>
78  </TR>
79  <TR>
80<TH>WPAD_FMT_FREESTYLE</TH>
81<TD>Nunchuk Style data format (<a href="./WPADStatus.html"><code>WPADFSStatus</code></a> structure). Only the button information is valid for the Wii Remote.</TD>
82  </TR>
83  <TR>
84<TH>WPAD_FMT_FREESTYLE_ACC</TH>
85<TD>Nunchuk Style data format (<a href="./WPADStatus.html"><code>WPADFSStatus</code></a> structure). The button and Motion Sensor information is valid for the Wii Remote.</TD>
86  </TR>
87  <TR>
88<TH>WPAD_FMT_FREESTYLE_ACC_DPD</TH>
89<TD>Nunchuk Style data format (<a href="./WPADStatus.html"><code>WPADFSStatus</code></a> structure). The Wii Remote button, Motion Sensor, and Pointer information is valid. However, only the coordinate data is valid for the Pointer.</TD>
90  </TR>
91  <TR>
92<TH>WPAD_FMT_CLASSIC</TH>
93<TD>Classic Style data format (<a href="./WPADStatus.html"><code>WPADCLStatus</code></a> structure). Only the button information is valid for the Wii Remote.</TD>
94  </TR>
95  <TR>
96<TH>WPAD_FMT_CLASSIC_ACC</TH>
97<TD>Classic Style data format (<a href="./WPADStatus.html"><code>WPADCLStatus</code></a> structure). The button and Motion Sensor information is valid for the Wii Remote.</TD>
98  </TR>
99  <TR>
100<TH>WPAD_FMT_CLASSIC_ACC_DPD</TH>
101<TD>Classic Style data format (<a href="./WPADStatus.html"><code>WPADCLStatus</code></a> structure). The Wii Remote button, Motion Sensor, and Pointer information is valid. However, only the coordinate data is valid for the Pointer.</TD>
102  </TR>
103  <TR>
104<TH>WPAD_FMT_CORE_ACC_DPD_FULL</TH>
105<TD>Wii Remote extended data format (<a href="./WPADStatus.html"><code>WPADStatusEx</code></a> structure). The Wii Remote button, Motion Sensor, and Pointer information is valid. For the pointer, the coordinates data, size, object radius, pixel value, and range are valid. However, the data rate is half that of normal (roughly 100 samples per second).</TD>
106  </TR>
107  <TR>
108<TH>WPAD_FMT_TRAIN</TH>
109<TD>Wii Remote + Master Controller data format (<code>WPADTRStatus</code> structure). Only Wii Remote buttons are enabled.</TD>
110  </TR>
111  <TR>
112<TH>WPAD_FMT_GUITAR</TH>
113<TD>Wii Remote + Guitar controller data format (<a href="./WPADStatus.html"><code>WPADCLStatus</code></a> structure). For the Wii Remote, the button, Motion Sensor, and Pointer information is valid. However, only the coordinate data is valid for the pointer.</TD>
114  </TR>
115  <TR>
116<TH>WPAD_FMT_DRUM</TH>
117<TD>Wii Remote + Drum Controller data format (<a href="./WPADStatus.html"><code>WPADCLStatus</code></a> structure). The Wii Remote button, Motion Sensor, and Pointer information is valid. However, the coordinate data is only valid for the Pointer.</TD>
118  </TR>
119  <TR>
120<TH>WPAD_FMT_TAIKO</TH>
121<TD>Wii Remote + Taiko Drum Controller data format (<a href="./WPADStatus.html"><code>WPADCLStatus</code></a> structure). The Wii Remote button, Motion Sensor, and Pointer information is valid. However, the coordinate data is only valid for the Pointer.</TD>
122  </TR>
123  <TR>
124<TH>WPAD_FMT_BALANCE_CHECKER</TH>
125<TD>Wii Balance Board data format (<a href="./WPADStatus.html"><code>WPADBLStatus</code> structure</a>). <font color="#ff0000">Note: Wii Balance Board default</font></TD>
126  </TR>
127  <TR>
128<TH>WPAD_FMT_MPLS</TH>
129<TD>Wii MotionPlus data format (<a href="./WPADStatus.html"><code>WPADMPStatus</code></a> structure). The Wii Remote button, Motion Sensor, and Pointer information is valid. However, the coordinate data is only valid for the Pointer. Use this format when the format is either the MotionPlus Style or the Nunchuk/MotionPlus Style. When the format is the Nunchuk/MotionPlus Style, the sampling rates for the Wii MotionPlus and the Nunchuk are half the normal rates.</font></TD>
130  </TR>
131</table>
132</blockquote>
133
134<h2>See Also</h2>
135<p class="reference">
136<!--<A href="./toc.html" target="contents"><CODE>WPAD関数</CODE></A>, --> <A href="./WPADSetDataFormat.html"><CODE>WPADSetDataFormat</CODE></A><BR><A href="./WPADStatus.html"><CODE>WPADStatus</CODE></A>
137</p>
138
139<H2>Revision History</H2>
140<p>
1412008/12/26 Added <code>WPAD_FMT_TAIKO</code>.<br>2008/12/19 Added <code>WPAD_FMT_DRUM</code>.<br> 2008/09/30 Explained the Wii MotionPlus.<br>2008/04/16 Added to the description of the master controller, guitar controller, and Wii Balance Board. Deleted the <CODE>WPADFSStatus</CODE>, <CODE>WPADCLStatus</CODE>, and <CODE>WPADStatusEx</CODE> structures from <B>See Also</B>.<br>2006/08/15 Added the extended data format.<br>2006/06/19 Renamed the external extension controller and added a data format.<br>2005/10/27 Changed layout.<br>2005/10/20 Initial version.<br>
142</p>
143
144<hr><p>CONFIDENTIAL</p></body>
145</html>