| ||||||||
Technical Support On-Line Manuals RTX166 Tiny User's Guide | Single-Tasking ProgramsBoth embedded and standard C programs start execution with the main C function. In an embedded application, main is usually implemented as an endless loop and can be thought of as a single task which is executed continuously. For example:
void main (void)
{
while (1) /* repeat forever */
{
do_something (); /* execute the do_something 'task' */
}
}
In this example, the do_something function can be thought of as a single task. Since there is only one task that executes, there is no need for multitasking capability or a multitasking operating system. | |||||||
| ||||||||