Module for task scheduling. More...
Typedefs | |
typedef void(* | sys_task_handler_t )(void) |
Prototype of a task handler. More... | |
Enumerations | |
enum | sys_task_ids_t { PHY_TASK_ID, HAL_TASK_ID, MAC_TASK_ID, APP_TASK_ID, SYS_TASK_ID, SYS_TASKS_AMOUNT } |
Identificators for registered handlers. More... | |
Functions | |
static void | sys_task_post (sys_task_ids_t task_id) |
Notify task scheduler to add a task for execution. More... | |
static bool | sys_tasks_pending (void) |
Returns true, if there are any event flags awaiting in the system scheduler. | |
void | sys_task_run (void) |
Variables | |
volatile uint_fast16_t | g_tasks |
Pending tasks. More... | |
Module for task scheduling.
typedef void(* sys_task_handler_t)(void) |
Prototype of a task handler.
Handler which will be called by the scheduler.
enum sys_task_ids_t |
Identificators for registered handlers.
Handlers will be called from the task scheduler.
|
inlinestatic |
Notify task scheduler to add a task for execution.
The function sets a marker for the task for execution. The task handler implements a tree architecture. Task handler of each layer includes handlers of the layer's components.
[in] | task_id | Task identificator. |
void sys_task_run | ( | void | ) |
Handle tasks in the main function.
volatile uint_fast16_t g_tasks |
Pending tasks.
Variable which includes markers of pending tasks.