#include <revolution/wpad.h> #include <revolution/wpadBalance.h> #include <revolution/wpadGuitar.h> #include <revolution/wpadTrain.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_BALANCE_CHECKER 3 #define WPAD_DEV_TRAIN 16 #define WPAD_DEV_GUITAR 17 #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 s32 WPADProbe( s32 chan, u32 *type );
| chan | One of the WPAD_CHANn values. |
|---|---|
| type | Pointer to the variable for getting the controller type. |
Returns the error status.
Error statuses are defined with the following macro constants.
WPAD_ERR_NONE Communicated successfully with the Wii Remote. The type variable contains a valid controller type. WPAD_ERR_NO_CONTROLLER Indicates the Wii Remote is not connected. The type variable does not contain a valid controller type (undefined). WPAD_ERR_BUSY Processing is being carried out for the Wii Remote. The type variable 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_FOUND Nothing is connected to the specified channel. WPAD_DEV_CORE Wii Remote. WPAD_DEV_FREESTYLE Nunchuk Style. WPAD_DEV_CLASSIC Classic Style. WPAD_DEV_TRAIN Wii Remote + Master Controller. WPAD_DEV_GUITAR Wii Remote + Guitar Controller. WPAD_DEV_BALANCE_CHECKER Wii Balance Board. WPAD_DEV_FUTURE A device that will be supported in the future. The device is legitimate, but this External Extension Controller cannot be used with this title. It can be operated as a Wii Remote. WPAD_DEV_NOT_SUPPORTED A device that cannot be used. This type is selected when an illegal device is plugged in or device recognition fails due to a poor connection with the external extension controller. It can be operated as a Wii Remote. WPAD_DEV_UNKNOWN Unknown device. This type is selected during the period between insertion of an External Extension Controller and completion of the recognition process. It can be operated as a Wii Remote.
The controller type can also be obtained by using the WPADSetExtensionCallback function. Because the WPADSetExtensionCallback function is used to register a notification callback when the controller type has changed, you can expect a lighter load than that from using the WPADProbe function to perform polling.
2008/04/16 Deleted WPAD_ERR_TRANSFER. Added WPAD_DEV_TRAIN, WPAD_DEV_GUITAR, and WPAD_DEV_BALANCE_CHECKER.
2008/03/17 Revised the description of WPAD_DEV_NOT_SUPPORTED.
2007/05/02 Added an explanation 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