This file contains all the Battery HAL API definitions. The APIs defined in this file helps with battery information and charging related functions.
More...
|
IotBatteryHandle_t | iot_battery_open (int32_t lBatteryInstance) |
| iot_battery_open is used to initialize the Battery and Charging driver.
|
|
void | iot_battery_set_callback (IotBatteryHandle_t const pxBatteryHandle, IotBatteryCallback_t xCallback, void *pvUserContext) |
| iot_battery_set_callback is used to set the callback to be called when a notification needs to be sent to the caller. THe callback is only called if the battery supports async notifications. Caller must check isAsyncNotificationSupported value before registering for callbacks, if async is not supported, registering for callback has no affect, and the callback will never be called.
|
|
IotBatteryInfo_t * | iot_battery_getInfo (IotBatteryHandle_t const pxBatteryHandle) |
| iot_battery_getInfo is used to get the battery info
|
|
int32_t | iot_battery_current (IotBatteryHandle_t const pxBatteryHandle, uint16_t *pusCurrent) |
| iot_battery_current is used to get the battery current in mA.
|
|
int32_t | iot_battery_voltage (IotBatteryHandle_t const pxBatteryHandle, uint16_t *pusVoltage) |
| iot_battery_voltage is used to get the battery voltage in milli-volts.
|
|
int32_t | iot_battery_chargeLevel (IotBatteryHandle_t const pxBatteryHandle, uint8_t *pucChargeLevel) |
| iot_battery_chargeLevel is used to get the battery charging level in percentage (from 1 to 100).
|
|
int32_t | iot_battery_capacity (IotBatteryHandle_t const pxBatteryHandle, uint16_t *pusCapacity) |
| iot_battery_capacity is used to get the current battery capacity value in mAh
|
|
int32_t | iot_battery_temp (IotBatteryHandle_t const pxBatteryHandle, int32_t *plTemp) |
| iot_battery_temp is used to get the battery temperature in milliCelsius
|
|
int32_t | iot_battery_enable_charging (IotBatteryHandle_t const pxBatteryHandle, uint8_t *pucEnable) |
| iot_battery_enable_charging is used to enable battery charging if charging is supported. if battery is already at full charge, enable will not charge battery until the charging level drops below 100, and even if battery is at critical level, and charging is not enabled, battery will not be charging. Charging is always enabled by default unless disabled by using this API.
|
|
int32_t | iot_battery_is_charging (IotBatteryHandle_t const pxBatteryHandle, uint8_t *pucCharging) |
| iot_battery_is_charging is used to query if the battery is currently charging.
|
|
int32_t | iot_battery_ioctl (IotBatteryHandle_t const pxBatteryHandle, IotBatteryIoctlRequest_t xRequest, void *const pvBuffer) |
| iot_battery_ioctl is used to set Battery configuration and Battery properties like battery threshold, temperature threshold, charging max, charging min etc..
|
|
int32_t | iot_battery_close (IotBatteryHandle_t const pxBatteryHandle) |
| iot_battery_close is used to de-Initialize Battery driver.
|
|
This file contains all the Battery HAL API definitions. The APIs defined in this file helps with battery information and charging related functions.