#include <revolution/wpad.h>
#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 | Operational status of the pointer |
speaker | Operational status of the speaker |
attach | External extension controller connection status. |
lowBat | Indicator that the battery has fallen below a certain level. |
battery | Expresses the battery level using four (WPAD_BATTERY_LEVEL_*) levels. |
led | Illumination status (WPAD_LED_CHAN_*) of the four player indicators. |
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 power remains in the Wii Remote withlowBatandbattery. While the Wii Remote is connecting or while it is being registered, the remaining battery power is displayed with the four player indicators.batteryis stored using four levels in the same way. In addition, whenbatteryisWPAD_BATTERY_LEVEL_LOW, lowBat isTRUE.
The on/off status of the four player indicators 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
08/15/2006 Initial version.
CONFIDENTIAL