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 name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>PADRead</TITLE>
9</HEAD>
10<BODY>
11<H1>PADRead</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/pad.h&gt;</CODE></PRE>
16  <DD>
17<PRE><CODE>#define PAD_CHAN0_BIT           0x80000000
18#define PAD_CHAN1_BIT           0x40000000
19#define PAD_CHAN2_BIT           0x20000000
20#define PAD_CHAN3_BIT           0x10000000</CODE></PRE>
21<PRE><CODE>u32 PADRead(<A href="PADStatus.html">PADStatus</A>* status);</CODE></PRE>
22</DL>
23<H2>Arguments</H2>
24<TABLE border="1" cellpadding="3" cellspacing="0.1">
25  <TBODY>
26    <TR>
27<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>status</EM></STRONG></CODE></TD>
28<TD width="520">Array[<code>PAD_MAX_CONTROLLERS</code>] of <a href="PADStatus.html"><code>PADStatus</code></a> to be filled in. <BR>Each <code>err</code> member will hold <code>PAD_ERR_NONE</code> if the pad status is valid. Otherwise it holds another error status. If <code>PADRead</code> is called at a rate faster than the rate specified by <A href="../si/SISetSamplingRate.html"><CODE>SISetSamplingRate</CODE></A>, then only the first <code>PADRead</code> will return a valid input value. The following <a href="PADRead.html"><code>PADRead</code></a> returns <code>PAD_ERR_TRANSFER</code> until the next break. </TD>
29    </TR>
30  </TBODY>
31</TABLE>
32<H2>Return Values</H2>
33<P>An OR bit mask of the controllers that support rumble motors (<code>PAD_CHAN</code><i>n</i><code>_BIT</code>). </P>
34<H2>Description</H2>
35<P>Checks the state of controllers. It takes an array of four <A href="PADStatus.html"><CODE>PADStatus</CODE></A> data as an argument. It gets the state of all pads at once.</P>
36
37<H2>See Also</H2>
38<P><A href="toc.html" target="contents">Controller Functions</A>, <CODE><A href="PADButtonDown.html">PADButtonDown</A></CODE>, <A href="PADButtonUp.html"><CODE>PADButtonUp</CODE></A>, <A href="PADClamp.html"><CODE>PADClamp</CODE></A>, <CODE><A href="PADInit.html">PADInit</A></CODE>, &nbsp;<CODE><A href="PADStatus.html">PADStatus</A></CODE></P>
39<H2>Revision History</H2>
40<P>03/01/2006 Initial version.</p>
41</BODY>
42</HTML>