xyControl
0.1
Quadrotor Flight Controller on AVR Basis
|
System for registering different tasks that will be called regularly, one after another. More...
Files | |
file | tasks.h |
Task API Header. | |
file | tasks.c |
Task API Implementation. | |
Data Structures | |
struct | TaskElement |
Single-Linked Task List. More... | |
Typedefs | |
typedef void(* | Task )(void) |
A Task has no arguments and returns nothing. More... | |
Functions | |
uint8_t | addTask (Task func) |
Adds another task that will be called regularly. More... | |
uint8_t | removeTask (Task func) |
Removes an already registered Task. More... | |
void | tasks (void) |
Executes registered Tasks. More... | |
uint8_t | tasksRegistered (void) |
Get the number of registered Tasks. More... | |
Variables | |
TaskElement * | taskList |
List of registered Tasks. More... | |
TaskElement * | taskList = NULL |
List of registered Tasks. More... | |
System for registering different tasks that will be called regularly, one after another.
typedef void(* Task)(void) |
uint8_t addTask | ( | Task | func | ) |
Adds another task that will be called regularly.
func | Task to be executed |
Definition at line 57 of file tasks.c.
References BANK_GENERIC, MEMSWITCH, MEMSWITCHBACK, TaskElement::next, TaskElement::task, and taskList.
Referenced by xyInit().
uint8_t removeTask | ( | Task | func | ) |
Removes an already registered Task.
func | Task to be removed |
Definition at line 71 of file tasks.c.
References BANK_GENERIC, MEMSWITCH, MEMSWITCHBACK, TaskElement::next, TaskElement::task, and taskList.
void tasks | ( | void | ) |
Executes registered Tasks.
Call this in your Main Loop!
Definition at line 93 of file tasks.c.
References BANK_GENERIC, MEMSWITCH, MEMSWITCHBACK, TaskElement::next, TaskElement::task, and taskList.
uint8_t tasksRegistered | ( | void | ) |
Get the number of registered Tasks.
Definition at line 47 of file tasks.c.
References BANK_GENERIC, MEMSWITCH, MEMSWITCHBACK, and TaskElement::next.
TaskElement* taskList = NULL |
List of registered Tasks.
Definition at line 45 of file tasks.c.
Referenced by addTask(), removeTask(), and tasks().
TaskElement* taskList |
List of registered Tasks.
Definition at line 45 of file tasks.c.
Referenced by addTask(), removeTask(), and tasks().