The Initialization APIs
Kernel Initialization
This is the kernel initialization function.
First, you must call this API.
void uos_kernel_init(void);
Task Setup
This is the task setup API.
You must call this API after uos_kernel_init.
void uos_task_setup(TASKID tid, void (*task)(void), unsigned int priority);
Kernel Startup
This is the kernel starting API.
You must call this API after uos_task_setup.
void uos_kernel_start(void);
The Task APIs
Task Sleep
This kernel API allows you to sleep the current task.
void uos_task_sleep(unsigned int ms);
Task Yield
This kernel API allows you to change the current task.
void uos_task_yield(void);
Task Event (Sender/Receiver)
These kernel APIs allows you to communicate between your application tasks.
void uos_task_event_send(TASKID tid, unsigned int value);
You can also get the sender task ID from the API.
void uos_task_event_recv(TASKID *tidptr, unsigned int *valptr);
Time API (Kernel/Task)
These kernel APIs allows you to get the running time for the kernel and the task.
void uos_time_kernel(uos_time_t *timeptr);
The uos_time_t is defined in uosdef.h and is the small structure for the time information.
void uos_time_task(uos_time_t *timeptr);