KPADSetControlMplsCallback

Syntax

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

#define KPAD_STATE_CTRL_MPLS_FAILED_CL  -3
#define KPAD_STATE_CTRL_MPLS_FAILED_FS  -2
#define KPAD_STATE_CTRL_MPLS_FAILED_EXP         -2
#define KPAD_STATE_CTRL_MPLS_FAILED_STD         -1
#define KPAD_STATE_CTRL_MPLS_START               0
#define KPAD_STATE_CTRL_MPLS_FINISHED            1

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

void KPADSetControlMplsCallback( s32 chan, KPADControlMplsCallback callback );

Parameters

chan One of the WPAD_CHANn values.
callback The callback that sends notification when the Wii MotionPlus is configured within the KPAD library.

Return Values

None.

Description

Registers the callback that sends notification when the Wii MotionPlus is configured within the KPAD library. If NULL is specified, no notifications are made until the callback is reset.

WPAD commands are issued during this interval, which may affect playback on the Wii remote speaker.

KPAD_STATE_CTRL_MPLS_STARTThis notification is sent when configuration of the Wii MotionPlus setting is required.
KPAD_STATE_CTRL_MPLS_FAILED_STDThis notification is issued in cases such as when the Wii MotionPlus is not plugged into the Wii remote and WPAD_MPLS_STD has been set using the KPADEnableMpls function.
KPAD_STATE_CTRL_MPLS_FAILED_FSThis notification is issued if processing fails such as when the Wii MotionPlus is not plugged into the Wii remote and WPAD_MPLS_FS has been set using the KPADEnableMpls function.
KPAD_STATE_CTRL_MPLS_FAILED_CLThis notification is issued if processing fails such as when the Wii MotionPlus is not plugged into the Wii remote and WPAD_MPLS_CL has been set using the KPADEnableMpls function.
KPAD_STATE_CTRL_MPLS_FINISHEDThis notification is sent when configuration finished normally, or when the Wii remote was disconnected or there was some similar interruption during configuration.

If configuration of the Wii MotionPlus setting failed, a retry is attempted.

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

KPADEnableMpls
KPADDisableMpls

Revision History

2013/05/08 Automated cleanup pass.
2008/12/04 Changed KPAD_STATE_CTRL_MPLS_FAILED_EXP to KPAD_STATE_CTRL_MPLS_FAILED_FS and revised the description. Added a description of KPAD_STATE_CTRL_MPLS_FAILED_CL.
2008/07/22 Initial version.


CONFIDENTIAL