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>C Specification</h2>
16
17<dl>
18<dd><pre><code>#include &lt;revolution/wpad.h&gt;
19
20#define WPAD_CHAN0                     0
21#define WPAD_CHAN1                     1
22#define WPAD_CHAN2                     2
23#define WPAD_CHAN3                     3
24
25#define WPAD_FMT_CORE                  0
26#define WPAD_FMT_CORE_ACC              1
27#define WPAD_FMT_CORE_ACC_DPD          2
28#define WPAD_FMT_FREESTYLE             3
29#define WPAD_FMT_FREESTYLE_ACC         4
30#define WPAD_FMT_FREESTYLE_ACC_DPD     5
31#define WPAD_FMT_CLASSIC               6
32#define WPAD_FMT_CLASSIC_ACC           7
33#define WPAD_FMT_CLASSIC_ACC_DPD       8
34#define WPAD_FMT_CORE_ACC_DPD_FULL     9
35
36u32 WPADGetDataFormat( s32 chan );
37      </code>
38    </pre>
39  </dd>
40</dl>
41
42<h2>Arguments</h2>
43<TABLE border="1">
44  <TBODY>
45    <TR>
46<TD width="120" bgcolor="#ffffe8"><code><b><i>chan</i></b></code></TD>
47<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD>
48    </TR>
49  </TBODY>
50</TABLE>
51<h2>Return Values</h2>
52<p>One of the <code>WPAD_FMT_*</code>.</p>
53
54<H2>Description</H2>
55<p>Obtains the data format of the received data on the specified channel. The default setting is the data format for the Wii Remote (<code>WPAD_FMT_CORE</code>).</p>
56<blockquote>
57Received data formats are defined with the macro constants shown below.
58<table border="1">
59<TR>
60<TD width="150"><CODE>WPAD_FMT_CORE </CODE></TD>
61<TD>Wii Remote data format (<a href="./WPADStatus.html"><code>WPADStatus</code> structure</a>). Only button information is valid. <br><B>Note:</B> This is the default type.</TD>
62</TR>
63<TR>
64<TD width="150"><CODE>WPAD_FMT_CORE_ACC </CODE></TD>
65<TD>Wii Remote data format (<a href="./WPADStatus.html"><code>WPADStatus</code> structure</a>). The button and motion sensor information is valid.</TD>
66</TR>
67<TR>
68<TD width="150"><CODE>WPAD_FMT_CORE_ACC_DPD </CODE></TD>
69<TD>Wii Remote data format (<a href="./WPADStatus.html"><code>WPADStatus</code> structure</a>). The button, motion sensor, and pointer information is valid. The pointer has valid size and coordinate data.</TD>
70</TR>
71<TR>
72<TD width="150"><CODE>WPAD_FMT_FREESTYLE</CODE></TD>
73<TD>Nunchuk Style data format type (<a href="./WPADFSStatus.html"><code>WPADFSStatus</code> structure</a>). For the Wii Remote, only the button information is valid.</TD>
74</TR>
75<TR>
76<TD width="150"><CODE>WPAD_FMT_FREESTYLE_ACC</CODE></TD>
77<TD>Nunchuk Style data format type (<a href="./WPADFSStatus.html"><code>WPADFSStatus</code> structure</a>). For the Wii Remote, the button and motion sensor information is valid.</TD>
78</TR>
79<TR>
80<TD width="150"><CODE>WPAD_FMT_FREESTYLE_ACC_DPD</CODE></TD>
81<TD>Nunchuk Style data format type (<a href="./WPADFSStatus.html"><code>WPADFSStatus</code> structure</a>). The Wii Remote button, motion sensor, and pointer information is valid. However, only the coordinate data is valid for the pointer.</TD>
82</TR>
83<TR>
84<TD width="150"><CODE>WPAD_FMT_CLASSIC</CODE></TD>
85<TD>Classic Style data format type (<a href="./WPADCLStatus.html"><code>WPADCLStatus</code> structure</a>). For the Wii Remote, only the button information is valid.</TD>
86</TR>
87<TR>
88<TD width="150"><CODE>WPAD_FMT_CLASSIC_ACC</CODE></TD>
89<TD>Classic Style data format type (<a href="./WPADCLStatus.html"><code>WPADCLStatus</code> structure</a>). For the Wii Remote, the button and motion sensor information is valid.</TD>
90</TR>
91<TR>
92<TD width="150"><CODE>WPAD_FMT_CLASSIC_ACC_DPD</CODE></TD>
93<TD>Classic Style data format type (<a href="./WPADCLStatus.html"><code>WPADCLStatus</code> structure</a>). The Wii Remote button, motion sensor, and pointer information is valid. However, only the coordinate data is valid for the pointer.</TD>
94</TR>
95<TR>
96<TD width="150"><CODE>WPAD_FMT_CORE_ACC_DPD_FULL</CODE></TD>
97<TD>Wii Remote extended data format (the <a href="./WPADStatus.html"><code>WPADStatusEx</code> structure</a>). 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>
98</TR>
99</table>
100</blockquote>
101<h2>See Also</h2>
102<p>
103<A href="./toc.html" target="contents">WPAD Functions</A><br> <A href="./WPADSetDataFormat.html"><CODE>WPADSetDataFormat</CODE></A>, <A href="./WPADStatus.html"><CODE>WPADStatus</CODE></A>, <A href="./WPADFSStatus.html"><CODE>WPADFSStatus</CODE></A>, <A href="./WPADCLStatus.html"><CODE>WPADCLStatus</CODE></A>, <A href="./WPADStatusEx.html"><CODE>WPADStatusEx</CODE></A><br>
104</p>
105
106<H2>Revision History</H2>
107<p>
1082006/08/15 Added the extended data format<br> 2006/06/19 Changed the name of the external extended controller; added data format<br> 2005/10/27 Changed the layout.<br>2005/10/20 Initial version.
109</p>
110
111<hr>
112<P>CONFIDENTIAL</p>
113</BODY>
114</HTML>