KPADSetControlDpdCallback

Syntax

#include <revolution/kpad.h>

#define KPAD_STATE_CTRL_DPD_START               0
#define KPAD_STATE_CTRL_DPD_FINISHED            1

typedef void (* KPADControlDpdCallback )( s32 chan, s32 reason );

void KPADSetControlDpdCallback( s32 chan, KPADControlDpdCallback callback );

Arguments

chan One of the WPAD_CHANn values.
callback The callback used when the Wii Remote DPD is configured inside KPAD.

Return Values

None.

Description

Registers the callback to be used when DPD settings are configured for the Wii Remote inside KPAD. If NULL is specified, no notifications will be made until reset. Note that registered callbacks will also be released when the KPADInit function is called.

In KPAD, the DPD setting will be changed internally when a controller is connected, an extended controller is swapped and the controller type is changed, and when the DPD enable/disable setting is changed using the KPADEnableDPD or KPADDisableDPD function.

Remote Speaker playback may be affected because the WPAD command will be issued at this time.

The callback reason value will receive KPAD_STATE_CTRL_DPD_START when DPD needs to be configured, and KPAD_STATE_CTRL_DPD_FINISHED when the configuration completes normally or the Wii Remote is disconnected during configuration.

When DPD configuration fails, there will be an internal retry. Once successfully completed, a callback notification will be made for the first time.

See Also

KPADEnableDPD, KPADDisableDPD

Revision History

2006/09/23 Initial version.


CONFIDENTIAL