Difference between revisions of "MCUHWC:GetBatteryVoltage"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
=Description= | =Description= | ||
− | Returns the battery | + | Returns a number which can be used to calculate the voltage using this formula: <code>magic * (voltage / 256)</code> where <code>magic</code> is a constant number which seems to range somewhere between <code>4.6</code> and <code>5.0</code>. Based on calculations and battery behavior it seems like it's indeed <code>5.0</code>. |
Revision as of 17:30, 2 July 2017
Request
Index Word | Description |
---|---|
0 | Header code [0x00040000] |
Response
Index Word | Description |
---|---|
0 | Header code |
1 | Result code |
2 | u8 battery_voltage |
Description
Returns a number which can be used to calculate the voltage using this formula: magic * (voltage / 256)
where magic
is a constant number which seems to range somewhere between 4.6
and 5.0
. Based on calculations and battery behavior it seems like it's indeed 5.0
.
When the charger is plugged into a fully charged old3DS unit, this value will be maximum 0xD1
Unplugging the charger will make the value go down to 0xCE
The voltage at 5% battery percentage just after the LEDs start flashing is 0xAF
Plugging in the charger at this point will make the voltage go up to 0xB9