WPADInfo

Syntax

#include <cafe/pads/wpad/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;
} WPADInfo;

Elements

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. 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.

Description

This structure represents the status of the Wii remote. The table above describes the information that is obtained.

See Also

WPADGetInfo
WPADGetInfoAsync

Revision History

2014-03-05 Fixed WPADInfo struct.
2013-05-08 Automated cleanup pass.
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