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
13
14<h1>KPADRead</h1>
15
16
17<h2>C Specification</h2>
18
19<dl>
20  <dd><pre><code>#include &lt;revolution/kpadOld.h&gt;</code></pre>
21  </dd>
22<dd><pre><CODE>s32 KPADRead( s32 chan, KPADStatus samplingBufs[], u32 length );</CODE></pre>
23  </dd>
24</dl>
25
26<h2>Arguments</h2>
27<p>
28<TABLE border="1">
29  <TBODY>
30    <TR>
31<TD><code><b><i>chan</i></b></code></TD>
32<TD>one of the <code>WPAD_CHAN<i>n</i></code> values.</TD>
33    </TR>
34    <TR>
35<TD><CODE><b><i>samplingBufs</i></b></CODE></TD>
36<TD>Pointer to the <a href="./KPADStatus.html"><code>KPADStatus</code></a> structure.</TD>
37    </TR>
38    <TR>
39<TD><CODE><b><i>length</i></b></CODE></TD>
40<TD>Maximum number of data sets to store. This value cannot exceed <CODE>KPAD_MAX_READ_BUFS</CODE>.</TD>
41    </TR>
42  </TBODY>
43</TABLE>
44
45</p>
46
47<h2>Return Values</h2>
48<p>Returns the number of data sets actually stored.</p>
49
50<H2>Description</H2>
51<p>
52This 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 time of the previous call to the time of the current call. (In other words, the newest data is always stored at the beginning of the buffer.) However, button information references only the most recent value when <a href="./KPADRead.html"><CODE>KPADRead</CODE></a> is called, and this value is copied to all current sampling buffers.
53</p>
54
55<h2>See Also</h2>
56<p>
57<code><a href="./KPADStatus.html">KPADStatus</a></code>
58</p>
59
60<H2>Revision History</H2>
61<P>
622006/03/01 Initial version. <BR>2006/08/xx Added a link under See Also.<br> 2006/10/25 Changed the name from Revolution SDK 2.3 to KPADOld library.<br>
63</P>
64
65<hr>
66<P>CONFIDENTIAL</p>
67</BODY>
68</HTML>