Important: The information in this document is obsolete and should not be used for new development.
GetBatteryVoltage
You can use theGetBatteryVoltagefunction to find out the battery voltage.
Fixed GetBatteryVoltage(short whichBattery);
whichBattery- The battery for which you want a voltage reading.
DESCRIPTION
TheGetBatteryVoltagefunction returns the battery voltage as a fixed-point number.The value of
whichBatteryshould be in the range 0 toBatteryCount()-1. If the value ofwhichBatteryis out of range, or the selected battery is not installed,GetBatteryVoltagewill return a result of 0.0 volts.ASSEMBLY-LANGUAGE INFORMATION
The trap is_PowerMgrDispatch($A09E). The selector value forGetBatteryVoltageis 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.