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 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/wpadTrain.h&gt;
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_FMT_CORE                  0
28#define WPAD_FMT_CORE_ACC              1
29#define WPAD_FMT_CORE_ACC_DPD          2
30#define WPAD_FMT_FREESTYLE             3
31#define WPAD_FMT_FREESTYLE_ACC         4
32#define WPAD_FMT_FREESTYLE_ACC_DPD     5
33#define WPAD_FMT_CLASSIC               6
34#define WPAD_FMT_CLASSIC_ACC           7
35#define WPAD_FMT_CLASSIC_ACC_DPD       8
36#define WPAD_FMT_CORE_ACC_DPD_FULL     9
37#define WPAD_FMT_TRAIN                10
38#define WPAD_FMT_GUITAR               11
39#define WPAD_FMT_BALANCE_CHECKER      12
40
41u32 WPADGetDataFormat( s32 chan );
42</pre></dd></dl>
43
44<h2>Arguments</h2>
45<TABLE class="arguments" border="1" >
46  <TBODY>
47    <TR>
48<TH>chan</TH>
49<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD>
50    </TR>
51  </TBODY>
52</TABLE>
53
54<h2>Return Values</h2>
55<p>One of the <code>WPAD_FMT_*</code>.</p>
56
57<H2>Description</H2>
58<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>
59<blockquote>
60Received data formats are defined with the macro constants shown below.
61<TABLE class="arguments" border="1" >
62  <TR>
63<TH>WPAD_FMT_CORE </TH>
64<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>
65  </TR>
66  <TR>
67<TH>WPAD_FMT_CORE_ACC </TH>
68<TD>Wii Remote data format (<a href="./WPADStatus.html"><code>WPADStatus</code></a> structure). The button and motion sensor information is valid.</TD>
69  </TR>
70  <TR>
71<TH>WPAD_FMT_CORE_ACC_DPD </TH>
72<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>
73  </TR>
74  <TR>
75<TH>WPAD_FMT_FREESTYLE</TH>
76<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>
77  </TR>
78  <TR>
79<TH>WPAD_FMT_FREESTYLE_ACC</TH>
80<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>
81  </TR>
82  <TR>
83<TH>WPAD_FMT_FREESTYLE_ACC_DPD</TH>
84<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>
85  </TR>
86  <TR>
87<TH>WPAD_FMT_CLASSIC</TH>
88<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>
89  </TR>
90  <TR>
91<TH>WPAD_FMT_CLASSIC_ACC</TH>
92<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>
93  </TR>
94  <TR>
95<TH>WPAD_FMT_CLASSIC_ACC_DPD</TH>
96<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>
97  </TR>
98  <TR>
99<TH>WPAD_FMT_CORE_ACC_DPD_FULL</TH>
100<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>
101  </TR>
102  <TR>
103<TH>WPAD_FMT_TRAIN</TH>
104<TD>Wii Remote + Master controller data format (<a href="./WPADStatus.html"><code>WPADTRStatus</code></a> structure). Only Wii Remote buttons are enabled.</TD>
105  </TR>
106  <TR>
107<TH>WPAD_FMT_GUITAR</TH>
108<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>
109  </TR>
110  <TR>
111<TH>WPAD_FMT_BALANCE_CHECKER</TH>
112<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>
113  </TR>
114</table>
115</blockquote>
116
117<h2>See Also</h2>
118<p class="reference">
119<A href="./WPADSetDataFormat.html">WPADSetDataFormat</A>,
120<A href="./WPADStatus.html">WPADStatus</A>
121</p>
122
123<H2>Revision History</H2>
124<p>
1252008/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>
126</p>
127
128<hr><p>CONFIDENTIAL</p></body>
129</html>