#include <revolution/wpad.h>
#define WPAD_CHAN0 0
#define WPAD_CHAN1 1
#define WPAD_CHAN2 2
#define WPAD_CHAN3 3
#define WPAD_DEV_CORE 0
#define WPAD_DEV_FREESTYLE 1
#define WPAD_DEV_CLASSIC 2
#define WPAD_DEV_FUTURE 251
#define WPAD_DEV_NOT_SUPPORTED 252
#define WPAD_DEV_NOT_FOUND 253
#define WPAD_DEV_UNKNOWN 255
#define WPAD_ERR_NONE 0
#define WPAD_ERR_NO_CONTROLLER -1
#define WPAD_ERR_BUSY -2
#define WPAD_ERR_TRANSFER -3
s32 WPADProbe( s32 chan, u32 *type );
chan |
One of the WPAD_CHANn values. |
type |
Pointer to the variable used for getting the controller type. |
Returns the error status.
Error statuses are defined with the following macro constants.
WPAD_ERR_NONECommunicated successfully with the Wii Remote. The typevariable contains a valid controller type.WPAD_ERR_NO_CONTROLLERThe Wii Remote is not connected. The typevariable does not contain a valid controller type (undefined).WPAD_ERR_BUSYProcessing is occurring for the Wii Remote. The typevariable does not contain a valid controller type (undefined).WPAD_ERR_TRANSFERA problem occurred during prior communications. The typevariable does not contain a valid controller type (undefined).
Checks the specified channel's controller type.
Controller types are defined with the following macro constants.
WPAD_DEV_NOT_FOUNDNothing is connected to the specified channel. WPAD_DEV_COREWii Remote. WPAD_DEV_FREESTYLENunchuk Style. WPAD_DEV_CLASSICClassic Style. WPAD_DEV_FUTUREA device that will be supported in the future. The device is legitimate, but this External Extension Controller cannot be used with this title. It may be operated as a Wii Remote.
WPAD_DEV_NOT_SUPPORTEDA device that cannot be used. This type is selected when device recognition fails or an illegal device is plugged in. It may be operated as a Wii Remote.
WPAD_DEV_UNKNOWNUnknown device. This type is selected during the period between insertion of an External Extension Controller and completion of the recognition process. It may be operated as a Wii Remote.
The controller type can be also obtained using the WPADSetExtensionCallback function.
Because the WPADSetExtensionCallback function registers a callback function for notifying about the changed controller type, you can expect a lighter load than when you poll using the WPADProbe function.
WPAD Function
WPADSetExtensionCallback
2007/05/02 2007/05/02 Added a description for the WPADSetExtensionCallback function.
2006/09/06 Added WPAD_DEV_FUTURE and WPAD_DEV_NOT_SUPPORTED to the controller types.
2006/06/19 Added WPAD_DEV_CLASSIC to the controller types, and revised the error status.
2005/10/27 Initial version.
CONFIDENTIAL