WPADBLStatus

C Specification

#include <revolution/wpad.h>
#include <revolution/wpadBalance.h>
  

#define WPAD_DPD_MAX_OBJECTS        4

#define WPAD_BUTTON_LEFT            0x0001
#define WPAD_BUTTON_RIGHT           0x0002
#define WPAD_BUTTON_DOWN            0x0004
#define WPAD_BUTTON_UP              0x0008
#define WPAD_BUTTON_PLUS            0x0010
#define WPAD_BUTTON_2               0x0100
#define WPAD_BUTTON_1               0x0200
#define WPAD_BUTTON_B               0x0400
#define WPAD_BUTTON_A               0x0800
#define WPAD_BUTTON_MINUS           0x1000
#define WPAD_BUTTON_HOME            0x8000

#define WPAD_PRESS_UNITS            4
#define WPAD_DEV_BALANCE_CHECKER    3
#define WPAD_FMT_BALANCE_CHECKER    12

typedef struct WPADBLStatus
{
    u16       button;
    s16       accX;
    s16       accY;
    s16       accZ;
    DPDObject obj[WPAD_DPD_MAX_OBJECTS];

    u8        dev;                          
    s8        err;

    u16       press[WPAD_PRESS_UNITS];
    s8        temp;                         
    u8        battery;                      

} WPADBLStatus;


typedef struct DPDObject
{
    s16 x;
    s16 y;
    u16 size;
    u8  traceId;
} DPDObject;

Elements

button Set to WPAD_BUTTON_A when the Power Button for the Wii Balance Board accessory is being pressed.
accX This is an undefined value because the Wii Balance Board accessory does not have a motion sensor.
accY This is an undefined value because the Wii Balance Board accessory does not have a motion sensor.
accZ This is an undefined value because the Wii Balance Board accessory does not have a motion sensor.
obj[].x This is an undefined value because the Wii Balance Board accessory does not have a pointer.
obj[].y This is an undefined value because the Wii Balance Board accessory does not have a pointer.
obj[].size This is an undefined value because the Wii Balance Board accessory does not have a pointer.
obj[].traceId This is an undefined value because the Wii Balance Board accessory does not have a pointer.
dev The controller type.
err The controller error status.
press The value of the sensors in the four corners of the Wii Balance Board accessory.
temp The temperature on the surface of the Wii Balance Board accessory.
battery The remaining battery life for the Wii Balance Board accessory.

Description

A structure that shows the state of the Wii Balance Board accessory.

Button inputs are defined with the following macro constants. The only button located on the Wii Balance Board accessory is its Power Button.
WPAD_BUTTON_A The Wii Balance Board accessory's Power Button is being pressed.
Controller types are defined with the following macro constants.
WPAD_DEV_NOT_FOUND Nothing is connected to the specified channel.
WPAD_DEV_CORE Wii Remote controller.
WPAD_DEV_FREESTYLE Nunchuk controller Style.
WPAD_DEV_CLASSIC Classic Style.
WPAD_DEV_BALANCE_CHECKER Wii Balance Board accessory.
WPAD_DEV_FUTURE A device that will be supported in the future. The device is legitimate, but this external extension controller cannot be used with this title. It may be operated as a Wii Remote controller.
WPAD_DEV_NOT_SUPPORTED A device that cannot be used. This type is selected when device recognition fails or an illegal device is plugged in. It may be operated as a Wii Remote controller.
WPAD_DEV_UNKNOWN Unknown device. This type is selected during the period between insertion of an external extension controller and completion of the recognition process. It may be operated as a Wii Remote controller.
Error statuses are defined with the following macro constants.
WPAD_ERR_NONE A Wii Balance Board accessory is connected. The WPADBLStatus structure contains valid data.
WPAD_ERR_NO_CONTROLLER A Wii Balance Board accessory is not connected. The WPADBLStatus structure does not contain valid data (structure members other than err are undefined).
WPAD_ERR_BUSY Processing is being carried out for the Wii Balance Board accessory. Only Wii Balance Board accessory button information in the WPADBLStatus structure is valid.
WPAD_ERR_TRANSFER Indicates a problem occurred during communications. The WPADBLStatus structure does not contain valid data (structure members other than err are undefined).
WPAD_ERR_INVALID The data format of data received from the Wii Balance Board accessory differs from that set by the WPADSetDataFormat function. (Structure members other than err are undefined.)
WPAD_ERR_CORRUPTED The Wii Balance Board accessory does not return this error.

See Also

WPAD Functions

Revision History

2007/11/14 Initial version.


CONFIDENTIAL