Atmel Software Framework

ucos_ii.h File Reference
#include <app_cfg.h>
#include <os_cfg.h>
#include <os_cpu.h>

Data Structures

struct  os_tcb
 

Macros

#define OS_ASCII_NUL   (INT8U)0
 
#define OS_DEL_ALWAYS   1u
 
#define OS_DEL_NO_PEND   0u
 
#define OS_ERR_CREATE_ISR   16u
 
#define OS_ERR_DEL_ISR   15u
 
#define OS_ERR_EVENT_NAME_TOO_LONG   11u
 
#define OS_ERR_EVENT_TYPE   1u
 
#define OS_ERR_FLAG_GRP_DEPLETED   114u
 
#define OS_ERR_FLAG_INVALID_OPT   113u
 
#define OS_ERR_FLAG_INVALID_PGRP   110u
 
#define OS_ERR_FLAG_NAME_TOO_LONG   115u
 
#define OS_ERR_FLAG_NOT_RDY   112u
 
#define OS_ERR_FLAG_WAIT_TYPE   111u
 
#define OS_ERR_INVALID_OPT   7u
 
#define OS_ERR_MBOX_FULL   20u
 
#define OS_ERR_MEM_FULL   94u
 
#define OS_ERR_MEM_INVALID_ADDR   98u
 
#define OS_ERR_MEM_INVALID_BLKS   91u
 
#define OS_ERR_MEM_INVALID_PART   90u
 
#define OS_ERR_MEM_INVALID_PBLK   95u
 
#define OS_ERR_MEM_INVALID_PDATA   97u
 
#define OS_ERR_MEM_INVALID_PMEM   96u
 
#define OS_ERR_MEM_INVALID_SIZE   92u
 
#define OS_ERR_MEM_NAME_TOO_LONG   99u
 
#define OS_ERR_MEM_NO_FREE_BLKS   93u
 
#define OS_ERR_NAME_GET_ISR   17u
 
#define OS_ERR_NAME_SET_ISR   18u
 
#define OS_ERR_NONE   0u
 
#define OS_ERR_NOT_MUTEX_OWNER   100u
 
#define OS_ERR_PDATA_NULL   9u
 
#define OS_ERR_PEND_ABORT   14u
 
#define OS_ERR_PEND_ISR   2u
 
#define OS_ERR_PEND_LOCKED   13u
 
#define OS_ERR_PEVENT_NULL   4u
 
#define OS_ERR_PIP_LOWER   120u
 
#define OS_ERR_PNAME_NULL   12u
 
#define OS_ERR_POST_ISR   5u
 
#define OS_ERR_POST_NULL_PTR   3u
 
#define OS_ERR_PRIO   41u
 
#define OS_ERR_PRIO_EXIST   40u
 
#define OS_ERR_PRIO_INVALID   42u
 
#define OS_ERR_Q_EMPTY   31u
 
#define OS_ERR_Q_FULL   30u
 
#define OS_ERR_QUERY_ISR   6u
 
#define OS_ERR_SEM_OVF   50u
 
#define OS_ERR_TASK_CREATE_ISR   60u
 
#define OS_ERR_TASK_DEL   61u
 
#define OS_ERR_TASK_DEL_IDLE   62u
 
#define OS_ERR_TASK_DEL_ISR   64u
 
#define OS_ERR_TASK_DEL_REQ   63u
 
#define OS_ERR_TASK_NAME_TOO_LONG   65u
 
#define OS_ERR_TASK_NO_MORE_TCB   66u
 
#define OS_ERR_TASK_NOT_EXIST   67u
 
#define OS_ERR_TASK_NOT_SUSPENDED   68u
 
#define OS_ERR_TASK_OPT   69u
 
#define OS_ERR_TASK_RESUME_PRIO   70u
 
#define OS_ERR_TASK_SUSPEND_IDLE   71u
 
#define OS_ERR_TASK_SUSPEND_PRIO   72u
 
#define OS_ERR_TASK_WAITING   73u
 
#define OS_ERR_TIME_DLY_ISR   85u
 
#define OS_ERR_TIME_INVALID_MINUTES   81u
 
#define OS_ERR_TIME_INVALID_MS   83u
 
#define OS_ERR_TIME_INVALID_SECONDS   82u
 
#define OS_ERR_TIME_NOT_DLY   80u
 
#define OS_ERR_TIME_ZERO_DLY   84u
 
#define OS_ERR_TIMEOUT   10u
 
#define OS_ERR_TMR_INACTIVE   135u
 
#define OS_ERR_TMR_INVALID   138u
 
#define OS_ERR_TMR_INVALID_DEST   136u
 
#define OS_ERR_TMR_INVALID_DLY   130u
 
#define OS_ERR_TMR_INVALID_NAME   133u
 
#define OS_ERR_TMR_INVALID_OPT   132u
 
#define OS_ERR_TMR_INVALID_PERIOD   131u
 
#define OS_ERR_TMR_INVALID_STATE   141u
 
#define OS_ERR_TMR_INVALID_TYPE   137u
 
#define OS_ERR_TMR_ISR   139u
 
#define OS_ERR_TMR_NAME_TOO_LONG   140u
 
#define OS_ERR_TMR_NO_CALLBACK   143u
 
#define OS_ERR_TMR_NON_AVAIL   134u
 
#define OS_ERR_TMR_STOPPED   142u
 
#define OS_EVENT_EN   (((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0) || (OS_SEM_EN > 0) || (OS_MUTEX_EN > 0))
 
#define OS_EVENT_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1) /* Size of event table */
 
#define OS_EVENT_TYPE_FLAG   5u
 
#define OS_EVENT_TYPE_MBOX   1u
 
#define OS_EVENT_TYPE_MUTEX   4u
 
#define OS_EVENT_TYPE_Q   2u
 
#define OS_EVENT_TYPE_SEM   3u
 
#define OS_EVENT_TYPE_UNUSED   0u
 
#define OS_EXT   extern
 
#define OS_FALSE   0u
 
#define OS_FLAG_CLR   0u
 
#define OS_FLAG_CONSUME   0x80u /* Consume the flags if condition(s) satisfied */
 
#define OS_FLAG_ERR_NOT_RDY   OS_ERR_FLAG_NOT_RDY
 
#define OS_FLAG_ERR_WAIT_TYPE   OS_ERR_FLAG_WAIT_TYPE
 
#define OS_FLAG_GRP_DEPLETED   OS_ERR_FLAG_GRP_DEPLETED
 
#define OS_FLAG_INVALID_OPT   OS_ERR_FLAG_INVALID_OPT
 
#define OS_FLAG_INVALID_PGRP   OS_ERR_FLAG_INVALID_PGRP
 
#define OS_FLAG_SET   1u
 
#define OS_FLAG_WAIT_CLR_ALL   0u /* Wait for ALL the bits specified to be CLR (i.e. 0) */
 
#define OS_FLAG_WAIT_CLR_AND   0u
 
#define OS_FLAG_WAIT_CLR_ANY   1u /* Wait for ANY of the bits specified to be CLR (i.e. 0) */
 
#define OS_FLAG_WAIT_CLR_OR   1u
 
#define OS_FLAG_WAIT_SET_ALL   2u /* Wait for ALL the bits specified to be SET (i.e. 1) */
 
#define OS_FLAG_WAIT_SET_AND   2u
 
#define OS_FLAG_WAIT_SET_ANY   3u /* Wait for ANY of the bits specified to be SET (i.e. 1) */
 
#define OS_FLAG_WAIT_SET_OR   3u
 
#define OS_MBOX_FULL   OS_ERR_MBOX_FULL
 
#define OS_MEM_FULL   OS_ERR_MEM_FULL
 
#define OS_MEM_INVALID_ADDR   OS_ERR_MEM_INVALID_ADDR
 
#define OS_MEM_INVALID_BLKS   OS_ERR_MEM_INVALID_BLKS
 
#define OS_MEM_INVALID_PART   OS_ERR_MEM_INVALID_PART
 
#define OS_MEM_INVALID_PBLK   OS_ERR_MEM_INVALID_PBLK
 
#define OS_MEM_INVALID_PDATA   OS_ERR_MEM_INVALID_PDATA
 
#define OS_MEM_INVALID_PMEM   OS_ERR_MEM_INVALID_PMEM
 
#define OS_MEM_INVALID_SIZE   OS_ERR_MEM_INVALID_SIZE
 
#define OS_MEM_NAME_TOO_LONG   OS_ERR_MEM_NAME_TOO_LONG
 
#define OS_MEM_NO_FREE_BLKS   OS_ERR_MEM_NO_FREE_BLKS
 
#define OS_N_SYS_TASKS   1u
 
#define OS_NO_ERR   OS_ERR_NONE
 
#define OS_NO_MORE_TCB   OS_ERR_TASK_NO_MORE_TCB
 
#define OS_PEND_OPT_BROADCAST   1u /* Broadcast action to ALL tasks waiting */
 
#define OS_PEND_OPT_NONE   0u /* NO option selected */
 
#define OS_POST_OPT_BROADCAST   0x01u /* Broadcast message to ALL tasks waiting */
 
#define OS_POST_OPT_FRONT   0x02u /* Post to highest priority task waiting */
 
#define OS_POST_OPT_NO_SCHED   0x04u /* Do not call the scheduler if this option is selected */
 
#define OS_POST_OPT_NONE   0x00u /* NO option selected */
 
#define OS_PRIO_ERR   OS_ERR_PRIO
 
#define OS_PRIO_EXIST   OS_ERR_PRIO_EXIST
 
#define OS_PRIO_INVALID   OS_ERR_PRIO_INVALID
 
#define OS_PRIO_SELF   0xFFu /* Indicate SELF priority */
 
#define OS_Q_EMPTY   OS_ERR_Q_EMPTY
 
#define OS_Q_FULL   OS_ERR_Q_FULL
 
#define OS_RDY_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1) /* Size of ready table */
 
#define OS_SEM_OVF   OS_ERR_SEM_OVF
 
#define OS_STAT_FLAG   0x20u /* Pending on event flag group */
 
#define OS_STAT_MBOX   0x02u /* Pending on mailbox */
 
#define OS_STAT_MULTI   0x80u /* Pending on multiple events */
 
#define OS_STAT_MUTEX   0x10u /* Pending on mutual exclusion semaphore */
 
#define OS_STAT_PEND_ABORT   2u /* Pending aborted */
 
#define OS_STAT_PEND_ANY   (OS_STAT_SEM | OS_STAT_MBOX | OS_STAT_Q | OS_STAT_MUTEX | OS_STAT_FLAG)
 
#define OS_STAT_PEND_OK   0u /* Pending status OK, not pending, or pending complete */
 
#define OS_STAT_PEND_TO   1u /* Pending timed out */
 
#define OS_STAT_Q   0x04u /* Pending on queue */
 
#define OS_STAT_RDY   0x00u /* Ready to run */
 
#define OS_STAT_SEM   0x01u /* Pending on semaphore */
 
#define OS_STAT_SUSPEND   0x08u /* Task is suspended */
 
#define OS_TASK_DEL_ERR   OS_ERR_TASK_DEL
 
#define OS_TASK_DEL_IDLE   OS_ERR_TASK_DEL_IDLE
 
#define OS_TASK_DEL_ISR   OS_ERR_TASK_DEL_ISR
 
#define OS_TASK_DEL_REQ   OS_ERR_TASK_DEL_REQ
 
#define OS_TASK_IDLE_ID   65535u /* ID numbers for Idle, Stat and Timer tasks */
 
#define OS_TASK_IDLE_PRIO   (OS_LOWEST_PRIO) /* IDLE task priority */
 
#define OS_TASK_NOT_EXIST   OS_ERR_TASK_NOT_EXIST
 
#define OS_TASK_NOT_SUSPENDED   OS_ERR_TASK_NOT_SUSPENDED
 
#define OS_TASK_OPT_ERR   OS_ERR_TASK_OPT
 
#define OS_TASK_OPT_NONE   0x0000u /* NO option selected */
 
#define OS_TASK_OPT_SAVE_FP   0x0004u /* Save the contents of any floating-point registers */
 
#define OS_TASK_OPT_STK_CHK   0x0001u /* Enable stack checking for the task */
 
#define OS_TASK_OPT_STK_CLR   0x0002u /* Clear the stack when the task is create */
 
#define OS_TASK_RESUME_PRIO   OS_ERR_TASK_RESUME_PRIO
 
#define OS_TASK_STAT_ID   65534u
 
#define OS_TASK_STAT_PRIO   (OS_LOWEST_PRIO - 1) /* Statistic task priority */
 
#define OS_TASK_SUSPEND_IDLE   OS_ERR_TASK_SUSPEND_IDLE
 
#define OS_TASK_SUSPEND_PRIO   OS_ERR_TASK_SUSPEND_PRIO
 
#define OS_TASK_TMR_ID   65533u
 
#define OS_TCB_RESERVED   ((OS_TCB *)1)
 
#define OS_TIME_INVALID_MINUTES   OS_ERR_TIME_INVALID_MINUTES
 
#define OS_TIME_INVALID_MS   OS_ERR_TIME_INVALID_MS
 
#define OS_TIME_INVALID_SECONDS   OS_ERR_TIME_INVALID_SECONDS
 
#define OS_TIME_NOT_DLY   OS_ERR_TIME_NOT_DLY
 
#define OS_TIME_ZERO_DLY   OS_ERR_TIME_ZERO_DLY
 
#define OS_TIMEOUT   OS_ERR_TIMEOUT
 
#define OS_TMR_OPT_CALLBACK   3u /* OSTmrStop() option to call 'callback' w/ timer arg. */
 
#define OS_TMR_OPT_CALLBACK_ARG   4u /* OSTmrStop() option to call 'callback' w/ new arg. */
 
#define OS_TMR_OPT_NONE   0u /* No option selected */
 
#define OS_TMR_OPT_ONE_SHOT   1u /* Timer will not automatically restart when it expires */
 
#define OS_TMR_OPT_PERIODIC   2u /* Timer will automatically restart when it expires */
 
#define OS_TMR_STATE_COMPLETED   2u
 
#define OS_TMR_STATE_RUNNING   3u
 
#define OS_TMR_STATE_STOPPED   1u
 
#define OS_TMR_STATE_UNUSED   0u
 
#define OS_TMR_TYPE   100u /* Used to identify Timers ... */
 
#define OS_TRUE   1u
 
#define OS_VERSION   286u /* Version of uC/OS-II (Vx.yy mult. by 100) */
 

Typedefs

typedef struct os_tcb OS_TCB
 

Functions

void OS_MemClr (INT8U *pdest, INT16U size)
 
void OS_MemCopy (INT8U *pdest, INT8U *psrc, INT16U size)
 
void OS_Sched (void)
 
void OS_TaskIdle (void *p_arg)
 
INT8U OS_TCBInit (INT8U prio, OS_STK *ptos, OS_STK *pbos, INT16U id, INT32U stk_size, void *pext, INT16U opt)
 
void OSInit (void)
 
void OSInitHookBegin (void)
 
void OSInitHookEnd (void)
 
void OSIntEnter (void)
 
void OSIntExit (void)
 
void OSStart (void)
 
void OSStatInit (void)
 
void OSTaskCreateHook (OS_TCB *ptcb)
 
void OSTaskDelHook (OS_TCB *ptcb)
 
void OSTaskIdleHook (void)
 
void OSTaskStatHook (void)
 
OS_STK * OSTaskStkInit (void(*task)(void *p_arg), void *p_arg, OS_STK *ptos, INT16U opt)
 
void OSTCBInitHook (OS_TCB *ptcb)
 
void OSTimeDly (INT16U ticks)
 
void OSTimeTick (void)
 
INT16U OSVersion (void)
 

Variables

OS_EXT INT32U OSCtxSwCtr
 
OS_EXT volatile INT32U OSIdleCtr
 
OS_EXT INT8U OSIntNesting
 
OS_EXT INT8U OSLockNesting
 
OS_EXT INT8U OSPrioCur
 
OS_EXT INT8U OSPrioHighRdy
 
OS_EXT INT8U OSRdyGrp
 
OS_EXT INT8U OSRdyTbl [OS_RDY_TBL_SIZE]
 
OS_EXT BOOLEAN OSRunning
 
OS_EXT INT8U OSTaskCtr
 
OS_EXT OS_STK OSTaskIdleStk [OS_TASK_IDLE_STK_SIZE]
 
OS_EXT OS_TCBOSTCBCur
 
OS_EXT OS_TCBOSTCBFreeList
 
OS_EXT OS_TCBOSTCBHighRdy
 
OS_EXT OS_TCBOSTCBList
 
OS_EXT OS_TCBOSTCBPrioTbl [OS_LOWEST_PRIO+1]
 
OS_EXT OS_TCB OSTCBTbl [OS_MAX_TASKS+OS_N_SYS_TASKS]
 
INT8U const OSUnMapTbl [256]
 

#define OS_ASCII_NUL   (INT8U)0
#define OS_DEL_ALWAYS   1u
#define OS_DEL_NO_PEND   0u
#define OS_ERR_CREATE_ISR   16u
#define OS_ERR_DEL_ISR   15u
#define OS_ERR_EVENT_NAME_TOO_LONG   11u
#define OS_ERR_EVENT_TYPE   1u
#define OS_ERR_FLAG_GRP_DEPLETED   114u
#define OS_ERR_FLAG_INVALID_OPT   113u
#define OS_ERR_FLAG_INVALID_PGRP   110u
#define OS_ERR_FLAG_NAME_TOO_LONG   115u
#define OS_ERR_FLAG_NOT_RDY   112u
#define OS_ERR_FLAG_WAIT_TYPE   111u
#define OS_ERR_INVALID_OPT   7u
#define OS_ERR_MBOX_FULL   20u
#define OS_ERR_MEM_FULL   94u
#define OS_ERR_MEM_INVALID_ADDR   98u
#define OS_ERR_MEM_INVALID_BLKS   91u
#define OS_ERR_MEM_INVALID_PART   90u
#define OS_ERR_MEM_INVALID_PBLK   95u
#define OS_ERR_MEM_INVALID_PDATA   97u
#define OS_ERR_MEM_INVALID_PMEM   96u
#define OS_ERR_MEM_INVALID_SIZE   92u
#define OS_ERR_MEM_NAME_TOO_LONG   99u
#define OS_ERR_MEM_NO_FREE_BLKS   93u
#define OS_ERR_NAME_GET_ISR   17u
#define OS_ERR_NAME_SET_ISR   18u
#define OS_ERR_NONE   0u

Referenced by OS_TCBInit().

#define OS_ERR_NOT_MUTEX_OWNER   100u
#define OS_ERR_PDATA_NULL   9u
#define OS_ERR_PEND_ABORT   14u
#define OS_ERR_PEND_ISR   2u
#define OS_ERR_PEND_LOCKED   13u
#define OS_ERR_PEVENT_NULL   4u
#define OS_ERR_PIP_LOWER   120u
#define OS_ERR_PNAME_NULL   12u
#define OS_ERR_POST_ISR   5u
#define OS_ERR_POST_NULL_PTR   3u
#define OS_ERR_PRIO   41u
#define OS_ERR_PRIO_EXIST   40u
#define OS_ERR_PRIO_INVALID   42u
#define OS_ERR_Q_EMPTY   31u
#define OS_ERR_Q_FULL   30u
#define OS_ERR_QUERY_ISR   6u
#define OS_ERR_SEM_OVF   50u
#define OS_ERR_TASK_CREATE_ISR   60u
#define OS_ERR_TASK_DEL   61u
#define OS_ERR_TASK_DEL_IDLE   62u
#define OS_ERR_TASK_DEL_ISR   64u
#define OS_ERR_TASK_DEL_REQ   63u
#define OS_ERR_TASK_NAME_TOO_LONG   65u
#define OS_ERR_TASK_NO_MORE_TCB   66u

Referenced by OS_TCBInit().

#define OS_ERR_TASK_NOT_EXIST   67u
#define OS_ERR_TASK_NOT_SUSPENDED   68u
#define OS_ERR_TASK_OPT   69u
#define OS_ERR_TASK_RESUME_PRIO   70u
#define OS_ERR_TASK_SUSPEND_IDLE   71u
#define OS_ERR_TASK_SUSPEND_PRIO   72u
#define OS_ERR_TASK_WAITING   73u
#define OS_ERR_TIME_DLY_ISR   85u
#define OS_ERR_TIME_INVALID_MINUTES   81u
#define OS_ERR_TIME_INVALID_MS   83u
#define OS_ERR_TIME_INVALID_SECONDS   82u
#define OS_ERR_TIME_NOT_DLY   80u
#define OS_ERR_TIME_ZERO_DLY   84u
#define OS_ERR_TIMEOUT   10u
#define OS_ERR_TMR_INACTIVE   135u
#define OS_ERR_TMR_INVALID   138u
#define OS_ERR_TMR_INVALID_DEST   136u
#define OS_ERR_TMR_INVALID_DLY   130u
#define OS_ERR_TMR_INVALID_NAME   133u
#define OS_ERR_TMR_INVALID_OPT   132u
#define OS_ERR_TMR_INVALID_PERIOD   131u
#define OS_ERR_TMR_INVALID_STATE   141u
#define OS_ERR_TMR_INVALID_TYPE   137u
#define OS_ERR_TMR_ISR   139u
#define OS_ERR_TMR_NAME_TOO_LONG   140u
#define OS_ERR_TMR_NO_CALLBACK   143u
#define OS_ERR_TMR_NON_AVAIL   134u
#define OS_ERR_TMR_STOPPED   142u
#define OS_EVENT_EN   (((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0) || (OS_SEM_EN > 0) || (OS_MUTEX_EN > 0))
#define OS_EVENT_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1) /* Size of event table */
#define OS_EVENT_TYPE_FLAG   5u
#define OS_EVENT_TYPE_MBOX   1u
#define OS_EVENT_TYPE_MUTEX   4u
#define OS_EVENT_TYPE_Q   2u
#define OS_EVENT_TYPE_SEM   3u
#define OS_EVENT_TYPE_UNUSED   0u

Referenced by OS_InitEventList().

#define OS_EXT   extern
#define OS_FALSE   0u

Referenced by OS_InitMisc(), OSStart(), and OSTimeTick().

#define OS_FLAG_CLR   0u
#define OS_FLAG_CONSUME   0x80u /* Consume the flags if condition(s) satisfied */
#define OS_FLAG_ERR_NOT_RDY   OS_ERR_FLAG_NOT_RDY
#define OS_FLAG_ERR_WAIT_TYPE   OS_ERR_FLAG_WAIT_TYPE
#define OS_FLAG_GRP_DEPLETED   OS_ERR_FLAG_GRP_DEPLETED
#define OS_FLAG_INVALID_OPT   OS_ERR_FLAG_INVALID_OPT
#define OS_FLAG_INVALID_PGRP   OS_ERR_FLAG_INVALID_PGRP
#define OS_FLAG_SET   1u
#define OS_FLAG_WAIT_CLR_ALL   0u /* Wait for ALL the bits specified to be CLR (i.e. 0) */
#define OS_FLAG_WAIT_CLR_AND   0u
#define OS_FLAG_WAIT_CLR_ANY   1u /* Wait for ANY of the bits specified to be CLR (i.e. 0) */
#define OS_FLAG_WAIT_CLR_OR   1u
#define OS_FLAG_WAIT_SET_ALL   2u /* Wait for ALL the bits specified to be SET (i.e. 1) */
#define OS_FLAG_WAIT_SET_AND   2u
#define OS_FLAG_WAIT_SET_ANY   3u /* Wait for ANY of the bits specified to be SET (i.e. 1) */
#define OS_FLAG_WAIT_SET_OR   3u
#define OS_MBOX_FULL   OS_ERR_MBOX_FULL
#define OS_MEM_FULL   OS_ERR_MEM_FULL
#define OS_MEM_INVALID_ADDR   OS_ERR_MEM_INVALID_ADDR
#define OS_MEM_INVALID_BLKS   OS_ERR_MEM_INVALID_BLKS
#define OS_MEM_INVALID_PART   OS_ERR_MEM_INVALID_PART
#define OS_MEM_INVALID_PBLK   OS_ERR_MEM_INVALID_PBLK
#define OS_MEM_INVALID_PDATA   OS_ERR_MEM_INVALID_PDATA
#define OS_MEM_INVALID_PMEM   OS_ERR_MEM_INVALID_PMEM
#define OS_MEM_INVALID_SIZE   OS_ERR_MEM_INVALID_SIZE
#define OS_MEM_NAME_TOO_LONG   OS_ERR_MEM_NAME_TOO_LONG
#define OS_MEM_NO_FREE_BLKS   OS_ERR_MEM_NO_FREE_BLKS
#define OS_N_SYS_TASKS   1u

Referenced by OS_InitTCBList().

#define OS_NO_ERR   OS_ERR_NONE
#define OS_NO_MORE_TCB   OS_ERR_TASK_NO_MORE_TCB
#define OS_PEND_OPT_BROADCAST   1u /* Broadcast action to ALL tasks waiting */
#define OS_PEND_OPT_NONE   0u /* NO option selected */
#define OS_POST_OPT_BROADCAST   0x01u /* Broadcast message to ALL tasks waiting */
#define OS_POST_OPT_FRONT   0x02u /* Post to highest priority task waiting */
#define OS_POST_OPT_NO_SCHED   0x04u /* Do not call the scheduler if this option is selected */
#define OS_POST_OPT_NONE   0x00u /* NO option selected */
#define OS_PRIO_ERR   OS_ERR_PRIO
#define OS_PRIO_EXIST   OS_ERR_PRIO_EXIST
#define OS_PRIO_INVALID   OS_ERR_PRIO_INVALID
#define OS_PRIO_SELF   0xFFu /* Indicate SELF priority */
#define OS_Q_EMPTY   OS_ERR_Q_EMPTY
#define OS_Q_FULL   OS_ERR_Q_FULL
#define OS_RDY_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1) /* Size of ready table */

Referenced by OS_InitRdyList().

#define OS_SEM_OVF   OS_ERR_SEM_OVF
#define OS_STAT_FLAG   0x20u /* Pending on event flag group */
#define OS_STAT_MBOX   0x02u /* Pending on mailbox */
#define OS_STAT_MULTI   0x80u /* Pending on multiple events */
#define OS_STAT_MUTEX   0x10u /* Pending on mutual exclusion semaphore */
#define OS_STAT_PEND_ABORT   2u /* Pending aborted */
#define OS_STAT_PEND_ANY   (OS_STAT_SEM | OS_STAT_MBOX | OS_STAT_Q | OS_STAT_MUTEX | OS_STAT_FLAG)

Referenced by OSTimeTick().

#define OS_STAT_PEND_OK   0u /* Pending status OK, not pending, or pending complete */

Referenced by OS_TCBInit(), and OSTimeTick().

#define OS_STAT_PEND_TO   1u /* Pending timed out */

Referenced by OSTimeTick().

#define OS_STAT_Q   0x04u /* Pending on queue */
#define OS_STAT_RDY   0x00u /* Ready to run */

Referenced by OS_TCBInit(), and OSTimeTick().

#define OS_STAT_SEM   0x01u /* Pending on semaphore */
#define OS_STAT_SUSPEND   0x08u /* Task is suspended */

Referenced by OSTimeTick().

#define OS_TASK_DEL_ERR   OS_ERR_TASK_DEL
#define OS_TASK_DEL_IDLE   OS_ERR_TASK_DEL_IDLE
#define OS_TASK_DEL_ISR   OS_ERR_TASK_DEL_ISR
#define OS_TASK_DEL_REQ   OS_ERR_TASK_DEL_REQ
#define OS_TASK_IDLE_ID   65535u /* ID numbers for Idle, Stat and Timer tasks */

Referenced by OS_InitTaskIdle().

#define OS_TASK_IDLE_PRIO   (OS_LOWEST_PRIO) /* IDLE task priority */

Referenced by OS_InitTaskIdle(), and OSTimeTick().

#define OS_TASK_NOT_EXIST   OS_ERR_TASK_NOT_EXIST
#define OS_TASK_NOT_SUSPENDED   OS_ERR_TASK_NOT_SUSPENDED
#define OS_TASK_OPT_ERR   OS_ERR_TASK_OPT
#define OS_TASK_OPT_NONE   0x0000u /* NO option selected */
#define OS_TASK_OPT_SAVE_FP   0x0004u /* Save the contents of any floating-point registers */
#define OS_TASK_OPT_STK_CHK   0x0001u /* Enable stack checking for the task */

Referenced by OS_InitTaskIdle().

#define OS_TASK_OPT_STK_CLR   0x0002u /* Clear the stack when the task is create */

Referenced by OS_InitTaskIdle().

#define OS_TASK_RESUME_PRIO   OS_ERR_TASK_RESUME_PRIO
#define OS_TASK_STAT_ID   65534u
#define OS_TASK_STAT_PRIO   (OS_LOWEST_PRIO - 1) /* Statistic task priority */
#define OS_TASK_SUSPEND_IDLE   OS_ERR_TASK_SUSPEND_IDLE
#define OS_TASK_SUSPEND_PRIO   OS_ERR_TASK_SUSPEND_PRIO
#define OS_TASK_TMR_ID   65533u
#define OS_TCB_RESERVED   ((OS_TCB *)1)
#define OS_TIME_INVALID_MINUTES   OS_ERR_TIME_INVALID_MINUTES
#define OS_TIME_INVALID_MS   OS_ERR_TIME_INVALID_MS
#define OS_TIME_INVALID_SECONDS   OS_ERR_TIME_INVALID_SECONDS
#define OS_TIME_NOT_DLY   OS_ERR_TIME_NOT_DLY
#define OS_TIME_ZERO_DLY   OS_ERR_TIME_ZERO_DLY
#define OS_TIMEOUT   OS_ERR_TIMEOUT
#define OS_TMR_OPT_CALLBACK   3u /* OSTmrStop() option to call 'callback' w/ timer arg. */
#define OS_TMR_OPT_CALLBACK_ARG   4u /* OSTmrStop() option to call 'callback' w/ new arg. */
#define OS_TMR_OPT_NONE   0u /* No option selected */
#define OS_TMR_OPT_ONE_SHOT   1u /* Timer will not automatically restart when it expires */
#define OS_TMR_OPT_PERIODIC   2u /* Timer will automatically restart when it expires */
#define OS_TMR_STATE_COMPLETED   2u
#define OS_TMR_STATE_RUNNING   3u
#define OS_TMR_STATE_STOPPED   1u
#define OS_TMR_STATE_UNUSED   0u
#define OS_TMR_TYPE   100u /* Used to identify Timers ... */
#define OS_TRUE   1u

Referenced by OSIntEnter(), OSIntExit(), and OSTimeTick().

#define OS_VERSION   286u /* Version of uC/OS-II (Vx.yy mult. by 100) */

Referenced by OSVersion().

typedef struct os_tcb OS_TCB

void OS_MemClr ( INT8U *  pdest,
INT16U  size 
)

Referenced by OS_InitEventList(), and OS_InitTCBList().

void OS_MemCopy ( INT8U *  pdest,
INT8U *  psrc,
INT16U  size 
)
void OS_Sched ( void  )
void OS_TaskIdle ( void *  p_arg)

References OSIdleCtr, and OSTaskIdleHook().

Referenced by OS_InitTaskIdle().

void OSInitHookBegin ( void  )

Referenced by OSInit().

void OSInitHookEnd ( void  )

Referenced by OSInit().

void OSIntEnter ( void  )

References OS_TRUE, OSIntNesting, and OSRunning.

void OSStart ( void  )
void OSStatInit ( void  )

Referenced by app_task().

void OSTaskCreateHook ( OS_TCB ptcb)

Referenced by OS_TCBInit().

void OSTaskDelHook ( OS_TCB ptcb)
void OSTaskIdleHook ( void  )

Referenced by OS_TaskIdle().

void OSTaskStatHook ( void  )
OS_STK* OSTaskStkInit ( void(*)(void *p_arg)  task,
void *  p_arg,
OS_STK *  ptos,
INT16U  opt 
)
void OSTCBInitHook ( OS_TCB ptcb)

Referenced by OS_TCBInit().

INT16U OSVersion ( void  )

References OS_VERSION.

OS_EXT INT32U OSCtxSwCtr

Referenced by OS_InitMisc(), OS_Sched(), and OSIntExit().

OS_EXT volatile INT32U OSIdleCtr

Referenced by OS_InitMisc(), and OS_TaskIdle().

OS_EXT INT8U OSIntNesting
OS_EXT INT8U OSLockNesting

Referenced by OS_InitMisc(), OS_Sched(), and OSIntExit().

OS_EXT INT8U OSPrioCur
OS_EXT INT8U OSPrioHighRdy
OS_EXT BOOLEAN OSRunning
OS_EXT INT8U OSTaskCtr

Referenced by OS_InitMisc(), and OS_TCBInit().

OS_EXT OS_STK OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE]

Referenced by OS_InitTaskIdle().

OS_EXT OS_TCB* OSTCBCur

Referenced by OS_InitRdyList(), OSStart(), and OSTimeDly().

OS_EXT OS_TCB* OSTCBFreeList

Referenced by OS_InitTCBList(), and OS_TCBInit().

OS_EXT OS_TCB* OSTCBHighRdy
OS_EXT OS_TCB* OSTCBList
INT8U const OSUnMapTbl[256]

Referenced by OS_SchedNew().