WPADControlExtGimmick

C Specification

#include <revolution/wpad.h>

#define WPAD_CHAN0               0
#define WPAD_CHAN1               1
#define WPAD_CHAN2               2
#define WPAD_CHAN3               3

#define WPAD_EXTGMK_OFF          0
#define WPAD_EXTGMK_ON           1

typedef void (*WPADCallback) ( s32 chan, s32 result );

s32 WPADControlExtGimmick( s32 chan, u32 command, WPADCallback callback );

Arguments

chan One of the WPAD_CHANn values.
pattern Either WPAD_EXTGMK_OFF or WPAD_EXTGMK_ON.
callback Callback function to notify about the result. Notification processing is omitted if NULL is specified.

Return Values

Returns one of the following codes:

WPAD_ERR_NONE
WPAD_ERR_NO_CONTROLLER
WPAD_ERR_BUSY

Description

Controls the gimmicks of the External Extension Controller plugged into the specified Wii Remote.

Commands for controlling the gimmicks of the External Extension Controller are registered in the WPAD library by this function. The WPAD library processes registered commands when other commands are not running.

This function is meant for controlling gimmicks in External Extension Controllers that may be developed in the future. The Nunchuk and Classic Controller do not have gimmicks, so calling this function for them does nothing.

The return values have the following meanings:

WPAD_ERR_NONE The WPAD library received a command.
WPAD_ERR_BUSY The WPAD library was unable to receive a command. Call it again later.
WPAD_ERR_NO_CONTROLLER The connection was broken.

In addition, if a callback function is set, the callback function returns the following error codes when the processing is complete. Their meanings are as follows:

WPAD_ERR_NONE The command was processed normally.
WPAD_ERR_BUSY The WPAD library was unable to receive a command. Call it again later.
WPAD_ERR_TRANSFER A communication error prevented normal processing of the command.
WPAD_ERR_NO_CONTROLLER The connection was broken.

See Also

WPAD Functions

Revision History

2006/11/29 Initial version.


CONFIDENTIAL