mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-29 00:59:56 -06:00
Add support for changing the DS and DSi battery level
The DS battery level is configured via the SPI Power Management Device, and the DSi's is configured via the I2C BPTWL. Add support for changing these registers and add the "Power Management" dialog in the UI.
This commit is contained in:
@ -19,11 +19,28 @@
|
||||
#ifndef DSI_I2C_H
|
||||
#define DSI_I2C_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
namespace DSi_BPTWL
|
||||
{
|
||||
|
||||
u8 GetBootFlag();
|
||||
|
||||
bool GetBatteryCharging();
|
||||
void SetBatteryCharging(bool charging);
|
||||
|
||||
enum
|
||||
{
|
||||
batteryLevel_Critical = 0x0,
|
||||
batteryLevel_AlmostEmpty = 0x1,
|
||||
batteryLevel_Low = 0x3,
|
||||
batteryLevel_Half = 0x7,
|
||||
batteryLevel_ThreeQuarters = 0xB,
|
||||
batteryLevel_Full = 0xF
|
||||
};
|
||||
|
||||
u8 GetBatteryLevel();
|
||||
void SetBatteryLevel(u8 batteryLevel);
|
||||
}
|
||||
|
||||
namespace DSi_I2C
|
||||
|
Reference in New Issue
Block a user