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_START 0 23#define WPAD_SYNC_EVT_DONE 1 24 25typedef void (*WPADSyncDeviceCallback) ( s32 result, s32 num ); 26 27WPADSyncDeviceCallback *WPADSetSyncDeviceCallback( WPADSyncDeviceCallback callback )</code></pre> 28 </dd> 29</dl> 30 31<h2>Arguments</h2> 32<TABLE border="1"> 33 <tr> 34<TD width="120" bgcolor="#ffffe8"><code><b><i>callback</i></b></code></TD> 35<TD>Sets the callback called when the synchro button is pressed and when registration is completed.</TD> 36 </tr> 37</TABLE> 38<h2>Return Values</h2> 39<p>A pointer to the previously set callback.</p> 40<H2>Description</H2> 41<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> 42<p> 43One of the <code>WPAD_SYNC_EVT_*</code> set is passed as the <code>result</code> argument for the callback function. 44</p> 45 46<table border="1"> 47<tr> 48 <td><code>WPAD_SYNC_EVT_START</code></td><td>The synchro button on the Wii console was pressed.</td> 49</tr> 50<tr> 51 <td><code>WPAD_SYNC_EVT_DONE</code></td><td>Registration has ended. The number of Wii Remote registered is passed to <code>num</code>.</td> 52</tr> 53</table> 54 55<h2>See Also</h2> 56<p> 57<A href="./toc.html" target="contents">WPAD Functions</A><br> <A href="./WPADStartSyncDevice.html"><CODE>WPADStartSyncDevice</CODE></A><br> 58</p> 59 60<H2>Revision History</H2> 61<P> 622007/07/10 Changed such that <CODE>WPAD_SYNC_EVT_BUSY</CODE> is no longer passed to the callback function.<br> 632006/06/19 Initial version.<br></P> 64<hr> 65<P>CONFIDENTIAL</p> 66</BODY> 67</HTML>