libtiepie-hw
1.1.3
|
Device battery related functions. More...
Functions | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_device_has_battery (tiepie_hw_handle handle) |
Check whether the device has a battery. More... | |
TIEPIE_HW_API int8_t | tiepie_hw_device_get_battery_charge (tiepie_hw_handle handle) |
Get the battery charge state of the device's battery in percent. More... | |
TIEPIE_HW_API int32_t | tiepie_hw_device_get_battery_time_to_empty (tiepie_hw_handle handle) |
Get the expected time in minutes until the battery will be empty. More... | |
TIEPIE_HW_API int32_t | tiepie_hw_device_get_battery_time_to_full (tiepie_hw_handle handle) |
Get the expected time in minutes until the battery will be fully charged. More... | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_device_is_battery_charger_connected (tiepie_hw_handle handle) |
Check whether a charger is connected to the device. More... | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_device_is_battery_charging (tiepie_hw_handle handle) |
Check whether the device's battery is being charged. More... | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_device_is_battery_broken (tiepie_hw_handle handle) |
Check whether the device's battery is defective. More... | |
Device battery related functions.
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_device_has_battery | ( | tiepie_hw_handle | handle | ) |
Check whether the device has a battery.
[in] | handle | A device handle identifying the device. |
TIEPIE_HW_STATUS_INVALID_HANDLE | |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API int8_t tiepie_hw_device_get_battery_charge | ( | tiepie_hw_handle | handle | ) |
Get the battery charge state of the device's battery in percent.
[in] | handle | A device handle identifying the device. |
-1
otherwise. TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated device does not support reading the battery charge or doesn't have a battery. |
TIEPIE_HW_STATUS_INVALID_HANDLE | |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API int32_t tiepie_hw_device_get_battery_time_to_empty | ( | tiepie_hw_handle | handle | ) |
Get the expected time in minutes until the battery will be empty.
[in] | handle | A device handle identifying the device. |
-1
TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated device does not support reading the battery time to empty or doesn't have a battery. |
TIEPIE_HW_STATUS_INVALID_HANDLE | |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API int32_t tiepie_hw_device_get_battery_time_to_full | ( | tiepie_hw_handle | handle | ) |
Get the expected time in minutes until the battery will be fully charged.
[in] | handle | A device handle identifying the device. |
-1
TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated device does not support reading the battery time to full or doesn't have a battery. |
TIEPIE_HW_STATUS_INVALID_HANDLE | |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_device_is_battery_charger_connected | ( | tiepie_hw_handle | handle | ) |
Check whether a charger is connected to the device.
[in] | handle | A device handle identifying the device. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated device does not have a battery. |
TIEPIE_HW_STATUS_INVALID_HANDLE | |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_device_is_battery_charging | ( | tiepie_hw_handle | handle | ) |
Check whether the device's battery is being charged.
[in] | handle | A device handle identifying the device. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated device does not have a battery. |
TIEPIE_HW_STATUS_INVALID_HANDLE | |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_device_is_battery_broken | ( | tiepie_hw_handle | handle | ) |
Check whether the device's battery is defective.
[in] | handle | A device handle identifying the device. |
TIEPIE_HW_STATUS_NOT_SUPPORTED | The indicated device does not have a battery. |
TIEPIE_HW_STATUS_INVALID_HANDLE | |
TIEPIE_HW_STATUS_OBJECT_GONE | |
TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED | |
TIEPIE_HW_STATUS_SUCCESS |