Task scheduler

nRF5 SDK v13.1.0

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...

Detailed Description

Module for task scheduling.

Typedef Documentation

typedef void(* sys_task_handler_t)(void)

Prototype of a task handler.

Handler which will be called by the scheduler.

Enumeration Type Documentation

Identificators for registered handlers.

Handlers will be called from the task scheduler.

Function Documentation

static void sys_task_post ( sys_task_ids_t task_id )
inline static

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.

Parameters
[in] task_id Task identificator.
void sys_task_run ( void )

Handle tasks in the main function.

Variable Documentation

volatile uint_fast16_t g_tasks

Pending tasks.

Variable which includes markers of pending tasks.