#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;
}
dpd | The pointer's operational status. |
speaker | The speaker's operational status. |
attach | External extension controller connection status. |
lowBat | This indicates whether the battery charge has dropped below a certain level and the indicator has dimmed. |
battery | The battery level, indicated on a scale of five (WPAD_BATTERY_LEVEL_*). |
led | The illumination status (WPAD_LED_CHAN_*) of the four Player LEDs. |
protocol | Not used. |
firmware | Not used. |
The WPADStatus structure represents the status of the Wii Remote.
TRUEis stored when the pointer has been launched with theWPADControlDpdfunction;FALSEis stored otherwise.
TRUEis stored when the speaker has been launched with theWPADControlSpeakerfunction;FALSEis stored if it is stopped.
TRUEis stored if an external extension controller is connected;FALSEis stored otherwise.
Indicates how much battery charge remains in the Wii Remote withlowBatandbattery. While the Wii Remote is connecting or while it is being registered, the remaining battery charge is displayed with the four Player LEDs.batteryis stored at one of five levels. IfbatteryisWPAD_BATTERY_LEVEL_LOW, then lowBat becomesTRUE. IfbatteryisWPAD_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.
WPAD Functions
WPADGetInfo, WPADGetInfoAsync
2006/09/06 Added WPAD_BATTERY_LEVEL_CRITICAL.
2006/08/15 Initial version.
CONFIDENTIAL