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<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<TITLE>PADSetSamplingCallback</TITLE>
9</HEAD>
10<BODY>
11<H1>PADSetSamplingCallback</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15<PRE><CODE>#include &lt;revolution/pad.h&gt;
16
17typedef void (* PADSamplingCallback )(void);
18</CODE>
19<CODE>PADSamplingCallback PADSetSamplingCallback(PADSamplingCallback callback);</CODE></PRE>
20</DL>
21<H2>Arguments</H2>
22<TABLE border="1" cellpadding="3" cellspacing="0.1">
23  <TBODY>
24    <TR>
25<TD width="120" bgcolor="#ffffe8"><CODE><STRONG><EM>callback</EM></STRONG></CODE></TD>
26<TD width="520">sampling callback function to to call</TD>
27    </TR>
28  </TBODY>
29</TABLE>
30<H2>Return Values</H2>
31<P>Pointer to the previous callback function.</P>
32<H2>Description</H2>
33<P>This function registers the PAD sampling callback. The specified callback function is called every time Hollywood completes sampling of the Controller data at the rate specified by <CODE><A href="../si/SISetSamplingRate.html">SISetSamplingRate</A></CODE>.&nbsp;</P>
34<P><STRONG>Note:</STRONG> The specified callback is called only when at least one GameCube Controller has been plugged into the system. Usually, this callback is called after the next vertical retrace interrupt. Ensure that your program does not call <code><a href="PADReset.html">PADReset</a></code> more than once before the callback is called or before the controller is removed from the Controller Socket. If called, the controller initialization process will not complete. </P>
35
36<P></P>
37<H2>See Also</H2>
38<P><A href="toc.html" target="contents">Controller Functions</A>, <CODE><A href="../si/SISetSamplingRate.html">SISetSamplingRate</A></CODE>, <CODE><A href="PADReset.html">PADReset</A></CODE>, <CODE><A href="../si/SIProbe.html">SIProbe</A></CODE></P>
39<H2>Revision History</H2>
40<P>2006/03/01 Initial version.</p>
41<hr>
42<P>CONFIDENTIAL</p>
43</BODY>
44</HTML>