WPADProbe

C Specification

#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_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 );

Arguments

chan One of WPAD_CHANn values.
type Pointer to the variable for getting the controller type.

Return Values

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 The Wii Remote is not connected. The type variable does not contain a valid controller type (undefined).
WPAD_ERR_BUSY Processing is occurring for the Wii Remote. The type variable does not contain a valid controller type (undefined).
WPAD_ERR_TRANSFER A problem occurred during prior communications. The type variable does not contain a valid controller type (undefined).

Description

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_UNKNOWN Unknown device.

See Also

WPAD Functions

Revision History

06/19/2006 Added WPAD_DEV_CLASSIC to controller types, revised error status.
10/27/2005 Initial version.


CONFIDENTIAL