Resources | Resources |



Device integration

Describes the system integration requirements for implementing the IBattery interface on a mobile device.

There is a sample file that is found in the AMSS software directory structure that OEMs can use to implement the battery:

This file contains sample source code that OEMs can use to implement the IBattery interface on mobile devices that incorporate Qualcomm MSM™ chipsets: ...AMSS\platform\brewmp\system\brewcore\src\OEM\ishellbased\msm\OEMBattery.c.

The file contains several flags that enable battery-related features:
Flag Description
FEATURE_BREW_BATTERY Enables the battery. Use the BATTERY_LEVEL_WARN flag to issue low-battery warnings. Use the BATTERY_LEVEL_POWERDOWN flag to notify when an external power supply is removed. Use the LATENCY_TIMER flag to set a latency timer when external power is disconnected.
FEATURE_BATTERY_NOTIFICATION Checks the in-use state of the phone. Use the TIMEOUT_MS_PERIODICBATTCHECK_FAST flag to specify how often to check the battery when the phone is in use or when external power is available.