Important: The information in this document is obsolete and should not be used for new development.
GetBatteryVoltage
You can use theGetBatteryVoltage
function to find out the battery voltage.
Fixed GetBatteryVoltage(short whichBattery);
whichBattery
- The battery for which you want a voltage reading.
DESCRIPTION
TheGetBatteryVoltage
function returns the battery voltage as a fixed-point number.The value of
whichBattery
should be in the range 0 toBatteryCount()
-1. If the value ofwhichBattery
is out of range, or the selected battery is not installed,GetBatteryVoltage
will return a result of 0.0 volts.ASSEMBLY-LANGUAGE INFORMATION
The trap is_PowerMgrDispatch
($A09E). The selector value forGetBatteryVoltage
is 27 ($1B) in the low word of register D0. The battery number is passed in the high word of register D0. The 32-bit value of the battery voltage is returned in register D0.