38#ifndef TASK_SCHEDULER_H
39#define TASK_SCHEDULER_H
65#define SCHEDULER_MAX_TASKS 8U
77typedef struct scheduler_t scheduler_t;
int32_t status_t
Type used for all status and error return values.
Definition argus_status.h:70
void(* task_function_t)(task_event_t e)
Task functions definition.
Definition task_scheduler.h:89
status_t Scheduler_AddTask(scheduler_t *const me, task_function_t task, task_prio_t priority, task_event_t eventQ, size_t eventQSize, const char *name)
Adds an new task to the scheduler.
Definition task_scheduler.c:105
uint8_t task_prio_t
Definition of the task priority (and unique task ID).
Definition task_scheduler.h:72
scheduler_t * Scheduler_Init(void)
Initializes the task scheduler.
Definition task_scheduler.c:97
status_t Scheduler_PostEvent(scheduler_t *const me, task_prio_t priority, task_event_t event)
Posts an event to the scheduler and executes it as soon as possible.
Definition task_scheduler.c:133
void * task_event_t
Task event type definition.
Definition task_scheduler.h:82
void Scheduler_SwitchContext(scheduler_t *const me)
Suspends the current task and runs another task.
Definition task_scheduler.c:181
bool Scheduler_IsTaskPending(scheduler_t *const me, task_prio_t priority)
Checks whether a specified task is pending for execution.
Definition task_scheduler.c:166
void Scheduler_Run(scheduler_t *const me)
Runs the task scheduler.
Definition task_scheduler.c:172
This file is part of the AFBR-S50 Explorer example application.