| |||||
Defining TasksReal-Time or multitasking applications are composed of one or more tasks that perform specific operations. RTX166 Tiny supports a maximum of 32 tasks. Tasks are simply C functions that have a void return type and a void argument list and are declared using the _task_ function attribute. For example: void func (void) _task_ task_id where
The following example defines the function job0 as task number 0. This task increments a counter and repeats.
void job0 (void) _task_ 0 {
while (1) {
counter0++; /* increment counter */
}
}
Note
| |||||
| |||||