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 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/pad.h> 16 17#define PAD_CHAN0_BIT 0x80000000 18#define PAD_CHAN1_BIT 0x40000000 19#define PAD_CHAN2_BIT 0x20000000 20#define PAD_CHAN3_BIT 0x10000000 21 22u32 PADRead(<A href="PADStatus.html">PADStatus</A>* status); 23</pre></dd></dl> 24 25<H2>Arguments</H2> 26<TABLE class="arguments" border="1" > 27 <TBODY> 28 <TR> 29<TH>status</TH> 30<TD>Array [<CODE>PAD_MAX_CONTROLLERS</CODE>] of <A href="PADStatus.html"><CODE>PADStatus</CODE></A> to be filled in. Each <SPAN class="argument">err</SPAN> 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 valid input values. The following calls to <CODE>PADRead</CODE> return <CODE>PAD_ERR_TRANSFER</CODE> until the next period.</TD> 31 </TR> 32 </TBODY> 33</TABLE> 34 35<H2>Return Values</H2> 36<P>An OR-ed bit mask (<CODE>PAD_CHAN</CODE><I>n</I><CODE>_BIT</CODE>) of the controllers that support rumble motors.</P> 37 38<H2>Description</H2> 39<P>Checks the state of controllers. The <CODE>PADRead</CODE> function gets an array of four pieces of <A href="PADStatus.html"><CODE>PADStatus</CODE></A> data to be used to read in the controller states. This function gets the state of all the pads at once.</P> 40 41<H2>See Also</H2> 42<P class="reference"> 43<A href="PADButtonDown.html">PADButtonDown</A>, 44<A href="PADButtonUp.html">PADButtonUp</A>, 45<A href="PADClamp.html">PADClamp</A>, 46<A href="PADInit.html">PADInit</A>, 47<A href="PADStatus.html">PADStatus</A> 48</P> 49 50<H2>Revision History</H2> 51<P> 522006/03/01 Initial version.<br> 53</p> 54 55<hr><p>CONFIDENTIAL</p></body> 56</HTML>