#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 );
| chan | One of the WPAD_CHANn values. |
|---|---|
| command | Either |
| callback | Callback function to notify about the result. Notification processing is omitted if NULL is specified. |
Returns one of the following codes:
WPAD_ERR_NONE
WPAD_ERR_NO_CONTROLLER
WPAD_ERR_BUSY
Controls the specified Wii Balance Board.
This function registers Wii Balance Board 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. |
|---|---|
| WPAD_BLCMD_ON | Starts the Wii Balance Board. |
| WPAD_BLCMD_UPDATE_TEMP | Updates the temperature value for the Wii Balance Board. |
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. |
None.
2007/09/11 Removed the command to obtain remaining battery power and added the command to obtain temperature.
2007/05/31 Initial version.
CONFIDENTIAL