BatteryDrvrGetLevels

This function returns the number of levels that the battery driver is capable of returning in the BatteryFlag and BackupBatteryFlag members of the BATTERY_STATUS structure.

Syntax

LONG BatteryDrvrGetLevels( void );

Return Values

Contains the number of levels that BatteryDrvrGetStatus can return in the BatteryFlag member of the structure BATTERY_STATUS. The low-order WORD contains the number of levels that can be returned for the main battery, and the high-order WORD contains the number of levels that can be returned for the backup battery.

The number of levels that can be returned ranges from 0 to 3. For example, if only the two values BATTERY_FLAG_HIGH and BATTERY_FLAG_LOW can be returned, the return value is 2. If BATTERY_FLAG_CRITICAL can also be returned, the value is 3.

Remarks

The values BATTERY_FLAG_CHARGING, BATTERY_FLAG_NO_BATTERY, and BATTERY_FLAG_UNKNOWN are ignored for the purposes of this count.

Implement this GWES-layer function as part of porting native device drivers.

This function is declared in the Battery.h header file.