#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 );
| chan | One of the WPAD_CHANn values. |
|---|---|
| command | Either WPAD_EXTGMK_OFF or WPAD_EXTGMK_ON. |
| callback | Callback function to report on the result. When NULL is specified, notification processing is omitted. |
Returns one of the following codes:
WPAD_ERR_NONE
WPAD_ERR_NO_CONTROLLER
WPAD_ERR_BUSY
Controls the gimmicks of the external extension controller connected to 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. Wait a short time and call it again. |
| 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. Wait a short time and call it again. |
| WPAD_ERR_TRANSFER | A communication error prevented normal processing of the command. |
| WPAD_ERR_NO_CONTROLLER | The connection was broken. |
None.
2007/09/18 Corrected a name mismatch between the argument list and the Syntax.
2006/11/29 Initial version.
CONFIDENTIAL