1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>WPADSetSyncDeviceCallback</title> 10</head> 11 12<body> 13 14<h1>WPADSetSyncDeviceCallback</h1> 15 16 17<h2>C Specification</h2> 18 19<dl> 20<dd><pre><code>#include <revolution/wpad.h> 21 22#define WPAD_SYNC_EVT_BUSY -1 23#define WPAD_SYNC_EVT_START 0 24#define WPAD_SYNC_EVT_DONE 1 25 26typedef void (*WPADSyncDeviceCallback) ( s32 result, s32 num ); 27 28WPADSyncDeviceCallback *WPADSetSyncDeviceCallback( WPADSyncDeviceCallback callback )</code></pre> 29 </dd> 30</dl> 31 32<h2>Arguments</h2> 33<TABLE border="1"> 34 <tr> 35<TD><code><b><i>callback</i></b></code></TD> 36 <TD>Sets the callback called when the synchro button is pressed and when registration is completed.</TD> 37 </tr> 38</TABLE> 39<h2>Return Values</h2> 40<p>A pointer to the previously set callback.</p> 41<H2>Description</H2> 42<P>Sets the callback called when the synchro button is pressed and when registration is completed. If no callback is set, <A href="./WPADStartSyncDevice.html"><code>WPADStartSyncDevice</code></a> is automatically called. </P> 43<p> 44One of the <code>WPAD_SYNC_EVT_*</code> set is passed as the <code>result</code> argument for the callback function. 45</p> 46 47<table border="1"> 48<tr> 49 <td><code>WPAD_SYNC_EVT_BUSY</code></td><td>Other processes (including registration) are currently running.</td> 50</tr> 51<tr> 52 <td><code>WPAD_SYNC_EVT_START</code></td><td>The synchro button on the Wii console was pressed.</td> 53</tr> 54<tr> 55 <td><code>WPAD_SYNC_EVT_DONE</code></td><td>Registration has ended. The number of Wii Remotes registered is passed to <code>num</code>.</td> 56</tr> 57</table> 58 59<h2>See Also</h2> 60<p> 61<A href="./toc.html" target="contents"><CODE>WPAD</CODE> Functions</A><br> <A href="./WPADStartSyncDevice.html"><CODE>WPADStartSyncDevice</CODE></A><br> 62</p> 63 64<H2>Revision History</H2> 65<P> 6606/19/2006 Initial version.<BR> 67</P> 68</body> 69</html>