Available Languages?:

OSA : OS_Task_Replace

OS_Task_Replace (priority, TaskName)

Allowed only in task

Replace current task with a new task. Current task will be deleted.

Call allowed:

Only in task

Parameters:

priority Task priority of a new task. Allowed values from 0 (highest) to 7 (lowest)
TaskName Name of C-function to be used as task

Returns:

nothing

Example:

void Task_Zero (void)
{
    for (;;) {
        RB0 = 0;
        OS_Task_Replace (1, Task_One);
    }
}
 
void Task_One (void)
{
    for (;;) {
        RB0 = 1;
        OS_Task_Replace (1, Task_Zero);
    }
}

Old style name

OS_ReplaceTask

See also

 
en/osa/ref/allservices/os_task_replace.txt · Last modified: 07.10.2010 13:58 (external edit)
 
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki