pico]OS  1.0.4
Functions
Nano Layer Initialization
User API: Nano Layer

Functions

NANOEXT void POSCALL nosInit (POSTASKFUNC_t firstfunc, void *funcarg, VAR_t priority, UINT_t taskStackSize, UINT_t idleStackSize)

Detailed Description


Function Documentation

NANOEXT void POSCALL nosInit ( POSTASKFUNC_t  firstfunc,
void *  funcarg,
VAR_t  priority,
UINT_t  taskStackSize,
UINT_t  idleStackSize 
)

Operating System Initialization. This function initializes the operating system (pico layer and nano layer) and starts the first tasks: the idle task and the first user task. Note: The nano layer requires dynamic memory management. If NOSCFG_MEM_MANAGER_TYPE is set to 1 (=use internal memory manager), it is required to set the variables ::heap_start and ::heap_end to valid values before this function is called.

Parameters:
firstfuncpointer to the first task function that will run in the multitasking environment.
funcargoptional argument passed to the first task.
prioritytask priority. Must be in the range 0 .. POSCFG_MAX_PRIO_LEVEL - 1. The higher the number, the higher the priority.
taskStackSizesize of the stack memory for the first task.
idleStackSizesize of the stack memory for the idle task.
Note:
This function replaces the function posInit if the nano layer is enabled and linked to the destination application.