Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
|
Task Runner runner API . More...
Functions | |
void | task_runner_init (const struct task_schedule *schedules, struct task_schedule_state *schedule_states, uint8_t num_schedules, const struct task_config *tasks, struct task_data *task_states, uint8_t num_tasks) |
Initialise the task runner with a schedule list. | |
void | task_runner_iterate (atomic_t *app_states, uint32_t uptime, uint32_t gps_time, uint8_t battery_charge) |
Iterate the task runner. | |
struct k_work_delayable * | task_runner_start_auto_iterate (void) |
Automatically iterate the task runner. | |
uint8_t | task_runner_watchdog_channel (void) |
Get the watchdog channel associated with the task runner. | |
Task Runner runner API .
void task_runner_init | ( | const struct task_schedule * | schedules, |
struct task_schedule_state * | schedule_states, | ||
uint8_t | num_schedules, | ||
const struct task_config * | tasks, | ||
struct task_data * | task_states, | ||
uint8_t | num_tasks ) |
#include <infuse/task_runner/runner.h>
Initialise the task runner with a schedule list.
schedules | Task schedules to evaluate |
schedule_states | State for each schedule in schedules |
num_schedules | Number of schedules and states |
tasks | Constant task configuration |
task_states | State for each task in task_config |
num_tasks | Number of tasks |
void task_runner_iterate | ( | atomic_t * | app_states, |
uint32_t | uptime, | ||
uint32_t | gps_time, | ||
uint8_t | battery_charge ) |
#include <infuse/task_runner/runner.h>
Iterate the task runner.
app_states | Application states |
uptime | Current device uptime in seconds |
gps_time | Current epoch time (GPS time) in seconds |
battery_charge | Battery charge percentage |
struct k_work_delayable * task_runner_start_auto_iterate | ( | void | ) |
#include <infuse/task_runner/runner.h>
Automatically iterate the task runner.
Automatically calls task_runner_iterate once a second forever. Also calls infuse_states_tick if CONFIG_INFUSE_APPLICATION_STATES is enabled.
Work | item that performs the iteration |
uint8_t task_runner_watchdog_channel | ( | void | ) |
#include <infuse/task_runner/runner.h>
Get the watchdog channel associated with the task runner.