WPADControlBLC

C Specification

#include <revolution/wpadBalance.h>

#define WPAD_CHAN0               0
#define WPAD_CHAN1               1
#define WPAD_CHAN2               2
#define WPAD_CHAN3               3

#define WPAD_BLCMD_ON            0xaa
#define WPAD_BLCMD_OFF           0x55
#define WPAD_BLCMD_UPDATE_TEMP   0x00

typedef void (*WPADCallback) ( s32 chan, s32 result );

s32 WPADControlBLC( s32 chan, u8 command, WPADCallback callback );

Arguments

chan Specify WPAD_CHAN3 because Wii Balance Board accessorys connect to WPAD_CHAN3.
command Either WPAD_BLCMD_ON, WPAD_BLCMD_OFF, or WPAD_BLCMD_UPDATE_TEMP.
callback Callback function to notify about the result. Notification processing is omitted if NULL is specified.

Return Values

Returns one of the following codes:

WPAD_ERR_NONE
WPAD_ERR_NO_CONTROLLER
WPAD_ERR_BUSY

Description

Controls the Wii Balance Board accessory.

This function registers Wii Balance Board accessory control commands with the WPAD library. The WPAD library processes registered commands when other commands are not running.

The different commands are defined as follows.

WPAD_BLCMD_OFF Stops the Wii Balance Board accessory.
WPAD_BLCMD_ON Starts the Wii Balance Board accessory.
WPAD_BLCMD_UPDATE_TEMP Updates the temperature value for the Wii Balance Board accessory.

The return values have the following meanings:

WPAD_ERR_NONE The WPAD library received the command.
WPAD_ERR_BUSY The WPAD library was unable to receive the command. Wait a short time and call the function again.
WPAD_ERR_NO_CONTROLLER The connection was broken.

In addition, if a callback function is set, the callback function returns the following error codes when its processing is complete. Their meanings are as follows:

WPAD_ERR_NONE The command was processed normally.
WPAD_ERR_BUSY The WPAD library was unable to receive the command. Wait a short time and call the function again.
WPAD_ERR_TRANSFER A communication error prevented normal processing of the command.
WPAD_ERR_NO_CONTROLLER The connection was broken.

See Also

Revision History

2007/11/15 Changed the device name to Wii Balance Board accessory.
2007/09/11 Removed the command to obtain remaining battery power and added the command to obtain temperature.
2007/05/31 Initial version.


CONFIDENTIAL