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>PADRecalibrate</TITLE>
9</HEAD>
10<BODY>
11<H1>PADRecalibrate</H1>
12
13<H2>Syntax</H2>
14<dl><dd><pre class="construction">
15#include &lt;revolution/pad.h&gt;
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
22BOOL PADRecalibrate(u32 mask);
23</pre></dd></dl>
24
25<H2>Arguments</H2>
26<TABLE class="arguments" border="1" >
27  <TBODY>
28    <TR>
29<TH>mask</TH>
30<TD>Bit OR mask of controllers (<CODE>PAD_CHAN</CODE><I>n</I><CODE>_BIT</CODE>) to reset</TD>
31    </TR>
32  </TBODY>
33</TABLE>
34
35<H2>Return Values</H2>
36<P>Always returns <CODE>TRUE</CODE>.</P>
37<P>Be aware that if <A href="PADRead.html"><CODE>PADRead</CODE></A> is called immediately after <CODE>PADRecalibrate</CODE> is run, the returned <A href="PADStatus.html"><CODE>PADStatus</CODE></A> for the specified ports may contain either a <CODE>PAD_ERR_NOT_READY</CODE> or <CODE>PAD_ERR_TRANSFER</CODE> error code. If this happens, <CODE>PADReset</CODE> (not <CODE>PADRecalibrate</CODE>) should be called repeatedly until <A href="PADRead.html"><CODE>PADRead</CODE></A> returns the <CODE>PAD_ERR_NONE</CODE> error code.</P>
38
39<H2>Description</H2>
40<P>This function recalibrates the specified controller. Furthermore, <CODE>PADRecalibrate</CODE> behaves like <A href="PADReset.html"><CODE>PADReset</CODE></A>. Note that the controller is automatically adjusted when the power is turned on. The <CODE>PADRecalibrate</CODE> function must be called when RESET has been pressed on the Wii console.</P>
41<P>No recalibration is performed for the WaveBird Controller even when the <CODE>PADRecalibrate</CODE> function is called. However, game programmers don't have to worry about this fact. Call the <CODE>PADRecalibrate</CODE> function whenever the RESET Button has been pressed.</P>
42
43<H2>See Also</H2>
44<P class="reference">
45<A href="PADButtonDown.html">PADButtonDown</A>,
46<A href="PADButtonUp.html">PADButtonUp</A>,
47<A href="PADInit.html">PADInit</A>,
48<A href="PADRead.html">PADRead</A>,
49<A href="PADReset.html">PADReset</A>,
50<A href="PADStatus.html">PADStatus</A>
51</P>
52
53<H2>Revision History</H2>
54<P>
552006/03/01 Initial version.<br>
56</p>
57
58<hr><p>CONFIDENTIAL</p></body>
59</HTML>