"User-Accessible" functions - the UIK API UIKInitialize - Initializes all the UIC kernel data structures Suggested prototype: void UIKInitialize(UINT16 ticklen, UINT8 MaxTasks); The "length" of the tick is specified in microseconds. The second argument is the maximum number of tasks the system can handle. Much of the actual functionality can possibly be placed into one of the .initX sections provided in the avr-gcc memory model. UIKAddTask - Adds a new task to the system. Nothing can run unless it has been "officially" added Suggested prototype: UINT8 UIKAddTask(void(* task)(void), UINT8 priority, /*stack*/); The first argument is a pointer to the task to be executed. The second argument is the priority (low number = high priority). The third argument should specify the stack to be used by the task; it's exact type will be determined according to the manner in which you wish to specify the task's stack. Choices include the stack address (i.e., the top address of the stack, which grows downward) or the stack size in bytes. Returns a task ID. UIKRun - Initiates execution of a task Suggested prototype: void UIKRun(UINT8 taskid); UIKSchedule - Allows a task to relinquish control, back to the scheduler void UIKSchedule(void); UIKDelay - causes the task to delay for at least the number of ticks that are specified Suggested prototype: void UIKDelay(UINT16 ticks); Internal UIK functions and data structures UIKDispatcher - Begins or resumes execution of the next task. This is the "scheduler" we have discussed in class. UIKIdle - The idle task - executes whenever there is nothing else to do. Depending on how you decide to implement it, it might simply be a regular task with the lowest possible priority. UIKTickHandler - "device driver" for UIK's main tick timer UIKTickNum - 32 bit global variable that is incremented by the tick handler. It is a count of the number of tick that have occurred so far. UIKTickLen - variable that holds the length of the tick, in microseconds UIKIntDepth - keeps track of the maximum interrupt depth encountered while running.