...
is a pointer to an error code. Some of the error codes below are issued only if the associated feature is enabled.
OS_ERR_NONE
initialization was successful.
OS_ERR_INT_Q
If OS_CFG_ISR_POST_DEFERRED_EN
is set to 1
in os_cfg.h
: OSCfg_IntQBasePtr
is NULL
. The error is detected by OS_IntQTaskInit()
in os_int.c
.
...
If OSCfg_TickTaskPrio
is invalid, The error is detected by OS_TickTaskInit()
in os_tick.c
.
OS_ERR_TICK_STK_INVALID
OSCfg_TickTaskStkBasePtr
is NULL
. The error is detected by OS_TickTaskInit()
in os_tick.c
.
OS_ERR_TICK_STK_SIZE_INVALID
OSCfg_TickTaskStkSize
is less than OSCfg_StkSizeMin
. This error was detected by OS_TickTaskInit()
in os_tick.c
.
OS_ERR_TMR_PRIO_INVALID
If OS_CFG_TMR_EN is
set to 1
in os_cfg.h:
OSCfg_TmrTaskPrio
is invalid. The error is detected by see OS_TmrInit()
in os_tmr.c
.
...
Returned Values
None
Notes/Warnings
OSInit()
must be called beforeOSStart()
.OSInit()
returns as soon as it detects an error in any of the sub-functions it calls. For example, ifOSInit()
encounters a problem initializing the task manager, an appropriate error code will be returned andOSInit()
will not go any further. It is therefore important that the user checks the error code before starting multitasking.