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<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/wpad.h> 19 20#define WPAD_SYNC_EVT_START 0 21#define WPAD_SYNC_EVT_DONE 1 22 23typedef void (*WPADSyncDeviceCallback) ( s32 result, s32 num ); 24 25WPADSyncDeviceCallback *WPADSetSyncDeviceCallback( WPADSyncDeviceCallback callback ); 26</pre></dd></dl> 27 28<h2>Arguments</h2> 29<TABLE class="arguments" border="1" > 30 <tr> 31<TH>callback</TH> 32<TD>Sets the callback called when the synchro button is pressed and when registration is completed.</TD> 33 </tr> 34</TABLE> 35 36<h2>Return Values</h2> 37<p>A pointer to the previously set callback.</p> 38 39<H2>Description</H2> 40<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> 41<p> 42One of the <code>WPAD_SYNC_EVT_*</code> set is passed as the <SPAN class="argument">result</SPAN> argument for the callback function. 43</p> 44 45<TABLE class="arguments" border="1" > 46<tr> 47 <th>WPAD_SYNC_EVT_START</th><td>The SYNCHRO on the Wii console was pressed.</td> 48</tr> 49<tr> 50 <th>WPAD_SYNC_EVT_DONE</th><td>Pairing has ended. The number of Wii Remote registered is passed to <SPAN class="argument">num</SPAN>.</td> 51</tr> 52</table> 53 54<h2>See Also</h2> 55<p class="reference"> 56<A href="./WPADStartSyncDevice.html">WPADStartSyncDevice</A> 57</p> 58 59<H2>Revision History</H2> 60<P> 612007/07/10 Changed so that <CODE>WPAD_SYNC_EVT_BUSY</CODE> is not passed to the callback function.<br>2006/06/19 Initial version.<br> 62</P> 63<hr><p>CONFIDENTIAL</p></body> 64</html>