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>KPADSetSamplingCallback</title>
8</head>
9
10<body>
11
12
13
14<h1>KPADSetSamplingCallback</h1>
15
16
17<h2>C Specification</h2>
18<DL>
19  <DD>
20  <PRE><code>#include &lt;revolution/kpad.h&gt;
21
22void KPADSetSamplingCallback( s32 chan, WPADSamplingCallback callback );</code></PRE>
23</DL>
24<H2>Arguments</H2>
25<TABLE border="1">
26  <TBODY>
27    <TR>
28<TD><code><b><i>chan</i></b></code></TD>
29<TD>one of the <code>WPAD_CHAN<i>n</i></code> values.</TD>
30    </TR>
31    <TR>
32<TD><CODE><b><i>callback</i></b></CODE></TD>
33      <TD>An application sampling callback that is called after the internal sampling callback of the KPAD library is processed.</TD>
34    </TR>
35  </TBODY>
36</TABLE>
37<H2>Return Values</H2>
38<P>None.</P>
39
40<H2>Description</H2>
41<p>
42Registers an application sampling callback. The application callback will not be called until reconfiguration when NULL is specified.
43</p>
44
45<p>
46Unlike with the KPADOld library, a WPAD library sampling callback will be used in the KPAD library. For this reason, the application cannot call a <a href="../wpad/WPADSetSamplingCallback.html">WPADSetSamplingCallback</a> function that regulates the WPAD library sampling callback. Please use this function instead.
47</p>
48
49<p>
50However, please note that the callback registered through this function will not be released whether a controller is connected or disconnected. To actually release the callback, insert NULL as the function argument. (Of course, a sampling callback will not be called at all in a disconnected state.)
51</p>
52
53<h2>See Also</h2>
54<p>
55<a href="../wpad/WPADSetSamplingCallback.html">WPADSetSamplingCallback</a><br>
56</p>
57
58<H2>Revision History</H2>
59<p>
602006/10/25 Initial version.<br>
61</p>
62
63<hr>
64<P>CONFIDENTIAL</p>
65</BODY>
66</HTML>
67