unsigned char ctl_task_set_priority(CTL_TASK_t *task,
                                    unsigned char priority);

ctl_task_set_priority changes the priority of task to priority. The priority can be 0, the lowest priority, to 255, which is the highest priority.

You can change the priority of the currently executing task by passing ctl_task_executing as the task parameter.

ctl_task_set_priority returns the previous priority of the task.