Hi Casper,

1. I must have thought this function would be consistent with other APIs
(probably charger or sensors).
Then since there would probably be only one battery reading device finding
it by name did not seem
vital and I simply forgot to do it.
2. There is no logic in OS to use battery yet so an application has to open
the device and do whatever needs to be done.
3. I'm afraid there is not.

br
Jerzy


sob., 18 kwi 2020 o 15:11 Casper Meijn <[email protected]> napisaƂ(a):

> Hi all,
>
> I have some questions about how to use the Battery Manager API. I want
> to write application code that is independent from the hardware. So my
> first try to retrieve the battery os_dev was using the
> `battery_mgr_find_by_name` function. However this function doesn't have
> a implementation. My second try was using `battery_get_battery`
> function, which returns the battery as expected, however it was not
> initialized. I got it working using `os_dev_open("battery" ...)`,
> however now I am dependant on the device name. So my questions are:
>
> - Why is `battery_mgr_find_by_name` not implemented?
> - Who is supposed to do `os_dev_open("battery" ...)`? Is that the
> application, the BSP or something else?
> - Are there examples of the usage of Battery Manager API?
>
> Thanks in advance,
> Casper
>
>

Reply via email to