Specifications

16.3. Battery API
BHT_GetPowerStatus
Description
Read information about the battery loaded in the BHT body.
Syntax
DWORD BHT_GetPowerStatus (
WORD* pwCuOnLine ,
WORD* pwBatteryFlag ,
WORD* pwBatteryVoltage ,
WORD* pwBatteryChemistry )
Parameters
pwCuOnLine
[out] Read the BHT state on/off the CU
pwCuOnLine Specification
AC_LINE_ONLINE Placed on the CU
AC_LINE_OFFLINE Not placed on the CU
pwBatteryFlag
[out] Read battery voltage level
pwBatteryFlag Specification
BHT_BATTERY_FLAG_HIGH
High level (3.9 V Voltage)
BHT_BATTERY_FLAG_MID
Medium level (3.7 V Voltage < 3.9 V)
BHT_BATTERY_FLAG_LOW
Low level (3.6 V Voltage < 3.7 V)
BHT_BATTERY_FLAG_WARNING Warning level (Voltage < 3.6 V)
BHT_BATTERY_FLAG_CRITICAL Critical level (Voltage < 3.5 V)
BHT_BATTERY_FLAG_NO_BATTERY No battery loaded
pwBatteryVoltage
[out] Battery output voltage (mV)
pwBatteryChemistry
[out] Battery type
pwBatteryChemistry Specification
BATTERY_CHEMISTRY_LION Lithium ion battery
BATTERY_CHEMISTRY_UNKNOWN Unknown
Return value
Error code Meaning
ERROR_SUCCESS Successful completion
ERROR_INVALID_PARAMETER Storage address not specified.
Comments
"BHT_BATTERY_FLAG_NO_BATTERY" for the battery level are never actually acquired.
103