WPADInfo

C Specification

#include <revolution/wpad.h>

#define WPAD_BATTERY_LEVEL_CRITICAL   0
#define WPAD_BATTERY_LEVEL_LOW        1
#define WPAD_BATTERY_LEVEL_MEDIUM     2
#define WPAD_BATTERY_LEVEL_HIGH       3
#define WPAD_BATTERY_LEVEL_MAX        4

#define WPAD_LED_CHAN_1             0x1
#define WPAD_LED_CHAN_2             0x2
#define WPAD_LED_CHAN_3             0x4
#define WPAD_LED_CHAN_4             0x8

typedef struct WPADInfo
{
BOOL dpd;
BOOL speaker;
BOOL attach;
BOOL lowBat;
u8 battery;
u8 led;
u8 protocol;
u8 firmware;
}

Elements

dpdThe pointer's operational status.
speakerThe speaker's operational status.
attachExternal extension controller connection status.
lowBatThis indicates whether the battery charge has dropped below a certain level and the indicator has dimmed.
batteryThe battery level, indicated on a scale of five (WPAD_BATTERY_LEVEL_*).
ledThe illumination status (WPAD_LED_CHAN_*) of the four Player LEDs.
protocolNot used.
firmwareNot used.

Description

The WPADStatus structure represents the status of the Wii Remote.

TRUE is stored when the pointer has been launched with the WPADControlDpd function; FALSE is stored otherwise.
TRUE is stored when the speaker has been launched with the WPADControlSpeaker function; FALSE is stored if it is stopped.
TRUE is stored if an external extension controller is connected; FALSE is stored otherwise.
Indicates how much battery charge remains in the Wii Remote with lowBat and battery. While the Wii Remote is connecting or while it is being registered, the remaining battery charge is displayed with the four Player LEDs. battery is stored at one of five levels. If battery is WPAD_BATTERY_LEVEL_LOW, then lowBat becomes TRUE. If battery is WPAD_BATTERY_LEVEL_CRITICAL, the battery charge can be recognized as going down quickly. Because the battery charge can vary depending on the type of battery, the remaining operational time may range between 20 seconds to 16 minutes.
The on/off status of the four Player LEDs for the Wii Remote is stored as a bit pattern. The lowest bit corresponds to the left of the player indicator.
This member is not used.
This member is not used.

See Also

WPAD Functions
WPADGetInfo, WPADGetInfoAsync

Revision History

2006/09/06 Added WPAD_BATTERY_LEVEL_CRITICAL.
2006/08/15 Initial version.


CONFIDENTIAL