Battery measurement task.
More...
Go to the source code of this file.
|
#define | BATTERY_TASK(define_mem, define_config, bat_ptr) |
| Battery task.
|
|
Battery measurement task.
- Copyright
- 2024 Embeint Holdings Pty Ltd
- Author
- Jordan Yates jorda.nosp@m.n@em.nosp@m.beint.nosp@m..com
SPDX-License-Identifier: FSL-1.1-ALv2
◆ BATTERY_TASK
#define BATTERY_TASK |
( |
| define_mem, |
|
|
| define_config, |
|
|
| bat_ptr ) |
Value: IF_ENABLED(define_config, ({.name = "bat", \
.task_arg.dev = bat_ptr, \
.executor.workqueue = { \
}}))
void battery_task_fn(struct k_work *work)
Battery task function.
@ TASK_ID_BATTERY
Definition infuse_task_ids.h:26
@ TASK_FLAG_ARG_IS_DEVICE
task_arg union is a device pointer
Definition task.h:38
@ TASK_EXECUTOR_WORKQUEUE
Task runs on the system workqueue.
Definition task.h:33
Battery task.
- Parameters
-
define_mem | Define memory |
define_config | Define task |
bat_ptr | Fuel-gauge device bound to task |
◆ battery_task_fn()
void battery_task_fn |
( |
struct k_work * | work | ) |
|
Battery task function.
- Parameters
-
◆ task_battery_manual_run()
Manually run the core battery sampling logic.
- Parameters
-
dev | Fuel gauge device |
args | Task arguments |
tdf | Battery parameters that were measured |
- Return values
-
0 | on success |
-errno | on failure |