WPADSetSyncDeviceCallback

Syntax

#include <cafe/pads/wpad/wpad.h>

#define WPAD_SYNC_EVT_START        0
#define WPAD_SYNC_EVT_DONE         1

typedef void (*WPADSyncDeviceCallback) ( s32 result, s32 num );

WPADSyncDeviceCallback *WPADSetSyncDeviceCallback( WPADSyncDeviceCallback callback );

Parameters

callback Sets the callback called when the synchro button is pressed and when registration is completed.

Return Values

A pointer to the previously set callback.

Description

Sets the callback called when the synchro button is pressed and when registration is completed. If no callback is set, WPADStartSyncDevice is automatically called.

One of the WPAD_SYNC_EVT_* set is passed as the result argument for the callback function.

WPAD_SYNC_EVT_STARTThe SYNCHRO on the Wii U console was pressed.
WPAD_SYNC_EVT_DONEPairing has ended. The number of Wii remote registered is passed to num.

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Multiple Cores Do not call this function from more than one Core.

See Also

WPADStartSyncDevice

Revision History

2013/05/08 Automated cleanup pass.
2007/07/10 Changed so that WPAD_SYNC_EVT_BUSY is not passed to the callback function.
2006/06/19 Initial version.


CONFIDENTIAL