WPADGetBatteryLevel

Syntax

#include <cafe/pads/wpad/wpad.h>

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

#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

u8 WPADGetBatteryLevel( s32 chan );

Parameters

chan One of the WPAD_CHANn values.

Return Values

One of the WPAD_BATTERY_LEVEL_* values.

Description

Gets the battery level of the Wii Remote for the specified channel. Indicates how much battery charge currently remains. WPAD library will update the battery level internally. When this API is called, it returns the value inside the library immediately.

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Multiple Cores Do not call this function from more than one Core.

Revision History

2014/03/05 Fixed WPADGetBatteryLevel prototype.
2013/05/08 Automated cleanup pass.
2012/02/27 Initial version.


CONFIDENTIAL