Synopsis
#include <ctl_api.h>
void ctl_task_init(CTL_TASK_t *task,
                   unsigned char priority,
                   char *name);
Description

ctl_task_init turns the main program into a task. This function takes a pointer in task to the CTL_TASK_t structure that represents the main task, it's priority (0 is the lowest priority, 255 the highest), and a zero terminated string pointed by name. On return from this function global interrupts will be enabled.

Restrictions

The function must be called before any other CrossWorks tasking library calls are made.

Portability

ctl_task_init is provided in every implementation of the CrossWorks tasking library.