MCUHWC:GetBatteryVoltage

From 3dbrew
Revision as of 20:59, 15 November 2018 by MarcusD (talk | contribs) (Replaced "magic" with the actual meaning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Request

Index Word Description
0 Header code [0x00040000]

Response

Index Word Description
0 Header code
1 Result code
2 u8 value

Description

Returns a number which can be used to calculate the voltage using Vref * (value / 256) where Vref seems to be 5.0v.


When the charger is plugged into a fully charged old3DS, the value will be around 0xD1 (~4.1v)

Unplugging the charger will make the value go down to 0xCE (~4v)

The voltage at 5% battery percentage just after the LEDs start flashing is 0xAF (~3.4v)

Plugging in the charger at this point will make the voltage go up to 0xB9 (~3.6v)