#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;
BOOL nearempty;
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 | Whether the indicator brightness is dropping. Voltages that change the indicator brightness exhibit hysteresis. Note that the brightness will drop when the battery level reaches WPAD_BATTERY_LEVEL_LOW, but the brightness will not be restored immediately even if the battery level changes to WPAD_BATTERY_LEVEL_MEDIUM afterwards. |
| nearempty | Whether there is a small amount of audio data left in the sound buffer. |
| battery | The battery level, indicated on a scale of five (WPAD_BATTERY_LEVEL_*). Indicates how much battery charge currently remains. |
| led | The illumination status (WPAD_LED_CHAN_*) of the four Player Indicators. |
| protocol | Not used. |
| firmware | Not used. |
This structure represents the status of the Wii Remote.
TRUEis stored when the Pointer has been launched with theWPADControlDpdfunction;FALSEis stored if it is stopped.
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.
You can use battery to determine how much battery charge remains in the Wii Remote. 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_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 Player Indicators on the Wii Remote will dim if the remaining battery charge gets low. You can use lowBat to determine if the current brightness is normal. Voltages that change the brightness of the Player Indicators exhibit hysteresis. The brightness will fall when battery isWPAD_BATTERY_LEVEL_LOW, and lowBat will be set toTRUE. Note that the brightness will not return immediately even if battery is set toWPAD_BATTERY_LEVEL_MEDIUMafterwards.
StoresTRUEif the audio data remaining in the sound buffer is close to empty, andFALSEotherwise.
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.
2008/07/08 Revised explanations related to lowBat and battery.
2007/09/18 Added nearempty.
2006/09/06 Added WPAD_BATTERY_LEVEL_CRITICAL.
2006/08/15 Initial version.
CONFIDENTIAL