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>KPADRead (KPADOld)</title>
8</head>
9
10<body>
11
12<h1>KPADRead</h1>
13
14<h2>Syntax</h2>
15<dl><dd><pre class="construction">
16#include &lt;revolution/kpadOld.h&gt;
17
18s32 KPADRead( s32 chan, KPADStatus samplingBufs[], u32 length );
19</pre></dd></dl>
20
21<h2>Arguments</h2>
22<p>
23<TABLE class="arguments" border="1" >
24  <TBODY>
25    <TR>
26<TH>chan</TH>
27<TD>One of the <code>WPAD_CHAN<i>n</i></code> values.</TD>
28    </TR>
29    <TR>
30<TH>samplingBufs</TH>
31<TD>Pointer to the <a href="./KPADStatus.html"><code>KPADStatus</code></a> structure.</TD>
32    </TR>
33    <TR>
34<TH>length</TH>
35<TD>Maximum number of data sets to store. This value cannot exceed <CODE>KPAD_MAX_READ_BUFS</CODE>.</TD>
36    </TR>
37  </TBODY>
38</TABLE>
39</p>
40
41<h2>Return Values</h2>
42<p>Returns the number of data sets that are stored.</p>
43
44<H2>Description</H2>
45<p>
46This function reads data in the <a href="./KPADStatus.html"><CODE>KPADStatus</CODE></a> structure type for each controller channel. We have assumed that this function will be called for each game frame. The buffer specified by the argument stores, from newest to oldest, the data sampled from the previous call's time to the current call's time. (In other words, the newest data is always stored at the beginning of the buffer.) However, for button information only, only the most recent values are referenced when <a href="./KPADRead.html"><CODE>KPADRead</CODE></a> is called, and these values are copied to all current sampling buffers.
47</p>
48
49<h2>See Also</h2>
50<p class="reference">
51<a href="./KPADStatus.html">KPADStatus</a>
52</p>
53
54<H2>Revision History</H2>
55<P>
562006/10/25 Changed the name to KPADOld library, beginning with Revolution SDK 2.3.<br>2006/08/xx Added a link under <B>See Also</B>.<br>2006/03/01 Initial version.<br>
57</P>
58
59<hr><p>CONFIDENTIAL</p></body>
60</html>