Uso de RTOS
Data Structures | Macros | Typedefs | Functions | Variables
UCOS_II.H File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  os_tcb
 

Macros

#define OS_VERSION   252
 
#define OS_EXT   extern
 
#define FALSE   0
 
#define OS_PRIO_SELF   0xFF
 
#define OS_N_SYS_TASKS   1
 
#define OS_STAT_PRIO   (OS_LOWEST_PRIO - 1)
 
#define OS_IDLE_PRIO   (OS_LOWEST_PRIO)
 
#define OS_EVENT_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1)
 
#define OS_RDY_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1)
 
#define OS_TASK_IDLE_ID   65535
 
#define OS_TASK_STAT_ID   65534
 
#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_STAT_RDY   0x00
 
#define OS_STAT_SEM   0x01
 
#define OS_STAT_MBOX   0x02
 
#define OS_STAT_Q   0x04
 
#define OS_STAT_SUSPEND   0x08
 
#define OS_STAT_MUTEX   0x10
 
#define OS_STAT_FLAG   0x20
 
#define OS_EVENT_TYPE_UNUSED   0
 
#define OS_EVENT_TYPE_MBOX   1
 
#define OS_EVENT_TYPE_Q   2
 
#define OS_EVENT_TYPE_SEM   3
 
#define OS_EVENT_TYPE_MUTEX   4
 
#define OS_EVENT_TYPE_FLAG   5
 
#define OS_FLAG_WAIT_CLR_ALL   0
 
#define OS_FLAG_WAIT_CLR_AND   0
 
#define OS_FLAG_WAIT_CLR_ANY   1
 
#define OS_FLAG_WAIT_CLR_OR   1
 
#define OS_FLAG_WAIT_SET_ALL   2
 
#define OS_FLAG_WAIT_SET_AND   2
 
#define OS_FLAG_WAIT_SET_ANY   3
 
#define OS_FLAG_WAIT_SET_OR   3
 
#define OS_FLAG_CONSUME   0x80
 
#define OS_FLAG_CLR   0
 
#define OS_FLAG_SET   1
 
#define OS_DEL_NO_PEND   0
 
#define OS_DEL_ALWAYS   1
 
#define OS_POST_OPT_NONE   0x00
 
#define OS_POST_OPT_BROADCAST   0x01
 
#define OS_POST_OPT_FRONT   0x02
 
#define OS_TASK_OPT_STK_CHK   0x0001
 
#define OS_TASK_OPT_STK_CLR   0x0002
 
#define OS_TASK_OPT_SAVE_FP   0x0004
 
#define OS_NO_ERR   0
 
#define OS_ERR_EVENT_TYPE   1
 
#define OS_ERR_PEND_ISR   2
 
#define OS_ERR_POST_NULL_PTR   3
 
#define OS_ERR_PEVENT_NULL   4
 
#define OS_ERR_POST_ISR   5
 
#define OS_ERR_QUERY_ISR   6
 
#define OS_ERR_INVALID_OPT   7
 
#define OS_ERR_TASK_WAITING   8
 
#define OS_TIMEOUT   10
 
#define OS_TASK_NOT_EXIST   11
 
#define OS_MBOX_FULL   20
 
#define OS_Q_FULL   30
 
#define OS_PRIO_EXIST   40
 
#define OS_PRIO_ERR   41
 
#define OS_PRIO_INVALID   42
 
#define OS_SEM_OVF   50
 
#define OS_TASK_DEL_ERR   60
 
#define OS_TASK_DEL_IDLE   61
 
#define OS_TASK_DEL_REQ   62
 
#define OS_TASK_DEL_ISR   63
 
#define OS_NO_MORE_TCB   70
 
#define OS_TIME_NOT_DLY   80
 
#define OS_TIME_INVALID_MINUTES   81
 
#define OS_TIME_INVALID_SECONDS   82
 
#define OS_TIME_INVALID_MILLI   83
 
#define OS_TIME_ZERO_DLY   84
 
#define OS_TASK_SUSPEND_PRIO   90
 
#define OS_TASK_SUSPEND_IDLE   91
 
#define OS_TASK_RESUME_PRIO   100
 
#define OS_TASK_NOT_SUSPENDED   101
 
#define OS_MEM_INVALID_PART   110
 
#define OS_MEM_INVALID_BLKS   111
 
#define OS_MEM_INVALID_SIZE   112
 
#define OS_MEM_NO_FREE_BLKS   113
 
#define OS_MEM_FULL   114
 
#define OS_MEM_INVALID_PBLK   115
 
#define OS_MEM_INVALID_PMEM   116
 
#define OS_MEM_INVALID_PDATA   117
 
#define OS_MEM_INVALID_ADDR   118
 
#define OS_ERR_NOT_MUTEX_OWNER   120
 
#define OS_TASK_OPT_ERR   130
 
#define OS_ERR_DEL_ISR   140
 
#define OS_ERR_CREATE_ISR   141
 
#define OS_FLAG_INVALID_PGRP   150
 
#define OS_FLAG_ERR_WAIT_TYPE   151
 
#define OS_FLAG_ERR_NOT_RDY   152
 
#define OS_FLAG_INVALID_OPT   153
 
#define OS_FLAG_GRP_DEPLETED   154
 

Typedefs

typedef struct os_tcb OS_TCB
 

Functions

void OSTimeDly (INT16U ticks)
 DELAY TASK 'n' TICKS (n from 0 to 65535) param ticks. More...
 
void OSTimeTick (void)
 PROCESS SYSTEM TICK.
 
void OSInit (void)
 INITIALIZATION.
 
void OSIntEnter (void)
 ENTER ISR.
 
void OSIntExit (void)
 EXIT ISR.
 
void OSStart (void)
 START MULTITASKING.
 
void OSStatInit (void)
 STATISTICS INITIALIZATION.
 
INT16U OSVersion (void)
 GET VERSION. More...
 
void OS_Sched (void)
 SCHEDULER
This function is called by other uC/OS-II services to determine whether a new, high priority task has been made ready to run. This function is invoked by TASK level code and is not used to reschedule tasks from ISRs (see OSIntExit() for ISR rescheduling). More...
 
void OS_TaskIdle (void *data)
 IDLE TASK.
 
INT8U OS_TCBInit (INT8U prio, OS_STK *ptos, OS_STK *pbos, INT16U id, INT32U stk_size, void *pext, INT16U opt)
 INITIALIZE TCB. More...
 
void OSInitHookBegin (void)
 OS INITIALIZATION HOOK
This function is called by OSInit() at the beginning of OSInit(). More...
 
void OSInitHookEnd (void)
 OS INITIALIZATION HOOK
This This function is called by OSInit() at the end of OSInit(). More...
 
void OSIntCtxSw (void)
 PERFORM A CONTEXT SWITCH (From an ISR) More...
 
void OSStartHighRdy (void)
 START HIGHEST PRIORITY TASK. More...
 
void OSTaskCreateHook (OS_TCB *ptcb)
 TASK CREATION HOOK
This function is called when a task is created. More...
 
void OSTaskDelHook (OS_TCB *ptcb)
 TASK DELETION HOOK
This function is called when a task is deleted. More...
 
void OSTaskIdleHook (void)
 IDLE TASK HOOK This function is called by OS_TaskIdle() which is executed whenever no other task is ready to run. This function can put the CPU to sleep, ready to be woken by an interupt or it can blink a LED to indicate how busy the processor is.
 
void OSTaskStatHook (void)
 STATISTIC TASK HOOK
This function is called every second by uC/OS-II's statistics task. This allows your application to add functionality to the statistics task. More...
 
OS_STKOSTaskStkInit (void(*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
 INITIALIZE A TASK'S STACK
This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the stack frame of the task being created. This function is highly processor specific. More...
 
void OSTaskSwHook (void)
 TASK SWITCH HOOK
This function is called when a task switch is performed. This allows you to perform other operations during a context switch. More...
 
void OSTCBInitHook (OS_TCB *ptcb)
 TICK HOOK. More...
 
void OSTimeTickHook (void)
 TICK HOOK
This function is called every tick. More...
 
void OSCtxSw (void)
 Switch the context by calling the function directly, since there are no software interrupts in a PIC18 processor. More...
 
void OSTickISR (void)
 

Variables

OS_EXT INT32U OSCtxSwCtr
 
OS_EXT INT8U OSIntNesting
 
OS_EXT INT8U OSIntExitY
 
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 volatile INT32U OSIdleCtr
 
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]
 
rom INT8U const OSMapTbl []
 
rom INT8U const OSUnMapTbl []
 

Detailed Description

Author
Jean J. Labrosse
Version
2.52

Macro Definition Documentation

◆ FALSE

#define FALSE   0

Falso Verdadero

◆ OS_DEL_ALWAYS

#define OS_DEL_ALWAYS   1

1 - TRUE

◆ OS_DEL_NO_PEND

#define OS_DEL_NO_PEND   0

0 - FALSE

◆ OS_ERR_CREATE_ISR

#define OS_ERR_CREATE_ISR   141

Error 141 - Error Crear ISR

◆ OS_ERR_DEL_ISR

#define OS_ERR_DEL_ISR   140

Error 140 - Error Delete ISR

◆ OS_ERR_EVENT_TYPE

#define OS_ERR_EVENT_TYPE   1

Error 1

◆ OS_ERR_INVALID_OPT

#define OS_ERR_INVALID_OPT   7

Error 7

◆ OS_ERR_NOT_MUTEX_OWNER

#define OS_ERR_NOT_MUTEX_OWNER   120

Error 120 - Mutex Error

◆ OS_ERR_PEND_ISR

#define OS_ERR_PEND_ISR   2

Error 2

◆ OS_ERR_PEVENT_NULL

#define OS_ERR_PEVENT_NULL   4

Error 4

◆ OS_ERR_POST_ISR

#define OS_ERR_POST_ISR   5

Error 5

◆ OS_ERR_POST_NULL_PTR

#define OS_ERR_POST_NULL_PTR   3

Error 3

◆ OS_ERR_QUERY_ISR

#define OS_ERR_QUERY_ISR   6

Error 6

◆ OS_ERR_TASK_WAITING

#define OS_ERR_TASK_WAITING   8

Error 8

◆ OS_EVENT_EN

#define OS_EVENT_EN   (((OS_Q_EN > 0) && (OS_MAX_QS > 0)) || (OS_MBOX_EN > 0) || (OS_SEM_EN > 0) || (OS_MUTEX_EN > 0))

Event Enabled

◆ OS_EVENT_TBL_SIZE

#define OS_EVENT_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1)

Size of event table

◆ OS_EVENT_TYPE_FLAG

#define OS_EVENT_TYPE_FLAG   5

Event Type 5

◆ OS_EVENT_TYPE_MBOX

#define OS_EVENT_TYPE_MBOX   1

Event Type 1

◆ OS_EVENT_TYPE_MUTEX

#define OS_EVENT_TYPE_MUTEX   4

Event Type 4

◆ OS_EVENT_TYPE_Q

#define OS_EVENT_TYPE_Q   2

Event Type 2

◆ OS_EVENT_TYPE_SEM

#define OS_EVENT_TYPE_SEM   3

Event Type 3

◆ OS_EVENT_TYPE_UNUSED

#define OS_EVENT_TYPE_UNUSED   0

Event Type 0 - Sin USO

◆ OS_FLAG_CLR

#define OS_FLAG_CLR   0

0 - FALSE

◆ OS_FLAG_CONSUME

#define OS_FLAG_CONSUME   0x80

Consume the flags if condition(s) satisfied

◆ OS_FLAG_ERR_NOT_RDY

#define OS_FLAG_ERR_NOT_RDY   152

Error 152 - Error Not Ready

◆ OS_FLAG_ERR_WAIT_TYPE

#define OS_FLAG_ERR_WAIT_TYPE   151

Error 151 - Error tipo Evento Espera

◆ OS_FLAG_GRP_DEPLETED

#define OS_FLAG_GRP_DEPLETED   154

Error 154 - Flag GRP

◆ OS_FLAG_INVALID_OPT

#define OS_FLAG_INVALID_OPT   153

Error 153 - Opcion Invalida

◆ OS_FLAG_INVALID_PGRP

#define OS_FLAG_INVALID_PGRP   150

Error 150 - Flaf Invalido

◆ OS_FLAG_SET

#define OS_FLAG_SET   1

1 - TRUE

◆ OS_FLAG_WAIT_CLR_ALL

#define OS_FLAG_WAIT_CLR_ALL   0

Wait for ALL the bits specified to be CLR (i.e. 0)

◆ OS_FLAG_WAIT_CLR_AND

#define OS_FLAG_WAIT_CLR_AND   0

Wait for AND the bits specified to be CLR (i.e. 0)

◆ OS_FLAG_WAIT_CLR_ANY

#define OS_FLAG_WAIT_CLR_ANY   1

Wait for ANY of the bits specified to be CLR (i.e. 0)

◆ OS_FLAG_WAIT_CLR_OR

#define OS_FLAG_WAIT_CLR_OR   1

Wait for OR of the bits specified to be CLR (i.e. 0)

◆ OS_FLAG_WAIT_SET_ALL

#define OS_FLAG_WAIT_SET_ALL   2

Wait for ALL the bits specified to be SET (i.e. 1)

◆ OS_FLAG_WAIT_SET_AND

#define OS_FLAG_WAIT_SET_AND   2

Wait for AND the bits specified to be SET (i.e. 1)

◆ OS_FLAG_WAIT_SET_ANY

#define OS_FLAG_WAIT_SET_ANY   3

Wait for ANY of the bits specified to be SET (i.e. 1)

◆ OS_FLAG_WAIT_SET_OR

#define OS_FLAG_WAIT_SET_OR   3

Wait for OR of the bits specified to be SET (i.e. 1)

◆ OS_IDLE_PRIO

#define OS_IDLE_PRIO   (OS_LOWEST_PRIO)

IDLE task priority

◆ OS_MBOX_FULL

#define OS_MBOX_FULL   20

Error 20

◆ OS_MEM_FULL

#define OS_MEM_FULL   114

Error 114

◆ OS_MEM_INVALID_ADDR

#define OS_MEM_INVALID_ADDR   118

Error 118 - Memoria Invalida

◆ OS_MEM_INVALID_BLKS

#define OS_MEM_INVALID_BLKS   111

Error 111

◆ OS_MEM_INVALID_PART

#define OS_MEM_INVALID_PART   110

Error 110

◆ OS_MEM_INVALID_PBLK

#define OS_MEM_INVALID_PBLK   115

Error 115

◆ OS_MEM_INVALID_PDATA

#define OS_MEM_INVALID_PDATA   117

Error 117

◆ OS_MEM_INVALID_PMEM

#define OS_MEM_INVALID_PMEM   116

Error 116

◆ OS_MEM_INVALID_SIZE

#define OS_MEM_INVALID_SIZE   112

Error 112

◆ OS_MEM_NO_FREE_BLKS

#define OS_MEM_NO_FREE_BLKS   113

Error 113

◆ OS_N_SYS_TASKS

#define OS_N_SYS_TASKS   1

Number of system tasks

◆ OS_NO_ERR

#define OS_NO_ERR   0

Error 0

◆ OS_NO_MORE_TCB

#define OS_NO_MORE_TCB   70

Error 70

◆ OS_POST_OPT_BROADCAST

#define OS_POST_OPT_BROADCAST   0x01

Broadcast message to ALL tasks waiting

◆ OS_POST_OPT_FRONT

#define OS_POST_OPT_FRONT   0x02

Post to highest priority task waiting

◆ OS_POST_OPT_NONE

#define OS_POST_OPT_NONE   0x00

Post to highest priority task waiting

◆ OS_PRIO_ERR

#define OS_PRIO_ERR   41

Error 41

◆ OS_PRIO_EXIST

#define OS_PRIO_EXIST   40

Error 40

◆ OS_PRIO_INVALID

#define OS_PRIO_INVALID   42

Error 42

◆ OS_PRIO_SELF

#define OS_PRIO_SELF   0xFF

Indicate SELF priority

◆ OS_Q_FULL

#define OS_Q_FULL   30

Error 30

◆ OS_RDY_TBL_SIZE

#define OS_RDY_TBL_SIZE   ((OS_LOWEST_PRIO) / 8 + 1)

Size of ready table

◆ OS_SEM_OVF

#define OS_SEM_OVF   50

Error 50

◆ OS_STAT_FLAG

#define OS_STAT_FLAG   0x20

Pending on event flag group

◆ OS_STAT_MBOX

#define OS_STAT_MBOX   0x02

Pending on mailbox

◆ OS_STAT_MUTEX

#define OS_STAT_MUTEX   0x10

Pending on mutual exclusion semaphore

◆ OS_STAT_PRIO

#define OS_STAT_PRIO   (OS_LOWEST_PRIO - 1)

Statistic task priority

◆ OS_STAT_Q

#define OS_STAT_Q   0x04

Pending on queue

◆ OS_STAT_RDY

#define OS_STAT_RDY   0x00

Ready to run

◆ OS_STAT_SEM

#define OS_STAT_SEM   0x01

Pending on semaphore

◆ OS_STAT_SUSPEND

#define OS_STAT_SUSPEND   0x08

Task is suspended

◆ OS_TASK_DEL_ERR

#define OS_TASK_DEL_ERR   60

Error 60

◆ OS_TASK_DEL_IDLE

#define OS_TASK_DEL_IDLE   61

Error 61

◆ OS_TASK_DEL_ISR

#define OS_TASK_DEL_ISR   63

Error 63

◆ OS_TASK_DEL_REQ

#define OS_TASK_DEL_REQ   62

Error 62

◆ OS_TASK_IDLE_ID

#define OS_TASK_IDLE_ID   65535

I.D. numbers for Idle tasks

◆ OS_TASK_NOT_EXIST

#define OS_TASK_NOT_EXIST   11

Error 11

◆ OS_TASK_NOT_SUSPENDED

#define OS_TASK_NOT_SUSPENDED   101

Error 101

◆ OS_TASK_OPT_ERR

#define OS_TASK_OPT_ERR   130

Error 130 - Mutex Error

◆ OS_TASK_OPT_SAVE_FP

#define OS_TASK_OPT_SAVE_FP   0x0004

Save the contents of any floating-point registers

◆ OS_TASK_OPT_STK_CHK

#define OS_TASK_OPT_STK_CHK   0x0001

Enable stack checking for the task

◆ OS_TASK_OPT_STK_CLR

#define OS_TASK_OPT_STK_CLR   0x0002

Clear the stack when the task is create

◆ OS_TASK_RESUME_PRIO

#define OS_TASK_RESUME_PRIO   100

Error 100

◆ OS_TASK_STAT_ID

#define OS_TASK_STAT_ID   65534

I.D. numbers for Stat tasks

◆ OS_TASK_SUSPEND_IDLE

#define OS_TASK_SUSPEND_IDLE   91

Error 91

◆ OS_TASK_SUSPEND_PRIO

#define OS_TASK_SUSPEND_PRIO   90

Error 90

◆ OS_TIME_INVALID_MILLI

#define OS_TIME_INVALID_MILLI   83

Error 83

◆ OS_TIME_INVALID_MINUTES

#define OS_TIME_INVALID_MINUTES   81

Error 81

◆ OS_TIME_INVALID_SECONDS

#define OS_TIME_INVALID_SECONDS   82

Error 82

◆ OS_TIME_NOT_DLY

#define OS_TIME_NOT_DLY   80

Error 80

◆ OS_TIME_ZERO_DLY

#define OS_TIME_ZERO_DLY   84

Error 84

◆ OS_TIMEOUT

#define OS_TIMEOUT   10

Error 10

◆ OS_VERSION

#define OS_VERSION   252

Version of uC/OS-II (Vx.yy mult. by 100)

Function Documentation

◆ OS_Sched()

void OS_Sched ( void  )

SCHEDULER
This function is called by other uC/OS-II services to determine whether a new, high priority task has been made ready to run. This function is invoked by TASK level code and is not used to reschedule tasks from ISRs (see OSIntExit() for ISR rescheduling).

Warning
1) This function is INTERNAL to uC/OS-II and your application should not call it.
2) Rescheduling is prevented when the scheduler is locked (see OS_SchedLock())

◆ OS_TCBInit()

INT8U OS_TCBInit ( INT8U  prio,
OS_STK ptos,
OS_STK pbos,
INT16U  id,
INT32U  stk_size,
void *  pext,
INT16U  opt 
)

INITIALIZE TCB.

Parameters
prio
ptos
pbos
id
stk_size
pext
opt
Returns
OS_NO_ERR if the call was successful
OS_NO_MORE_TCB if there are no more free TCBs to be allocated and thus, the task cannot be created.

◆ OSCtxSw()

void OSCtxSw ( void  )

Switch the context by calling the function directly, since there are no software interrupts in a PIC18 processor.

TASK LEVEL CONTEXT SWITCH
This function is called when a task makes a higher priority task ready-to-run. /*.

TASK CONTEXT SWITCH

Switch the context by calling the function directly, since there are no software interrupts in a PIC18 processor.

TASK LEVEL CONTEXT SWITCH

Description : This function is called when a task makes a higher priority task ready-to-run.

Arguments : none

Note(s) : 1) Upon entry, OSTCBCur points to the OS_TCB of the task to suspend OSTCBHighRdy points to the OS_TCB of the task to resume

2) The stack frame of the task to resume looks as follows:

                                                                       LOW MEMORY
                        -   19      pdata (lower 8 bits)
                        -   18      pdata (upper 8 bits)
                        -   17      XX (pointed to by FSR1, frame pointer)
                        -   16      STATUS  register
                        -   15      BSR     register
                        -   14      W       register
                        -   13      FSR0L   register
                        -   12      FSR0H   register
                        -   11      FSR2L   register (frame pointer, low)
                        -   10      FSR2H   register (frame pointer, high)
                        -   9       TBLPTRL register
                        -   8       TBLPTRH register
                        -   7       TBLPTRU register
                        -   6       PRODL   register
                        -   5       PRODH   register

                    (end repeating, based on number of items)
                        -   4       TOSL    (top of return stack, low)
                        -   3       TOSH    (top of return stack, high)
                        -   2       TOSU    (top of return stack, upper)
                    (start repeating, based on number of items)

                        -   1       (number of return stack items)

OSTCBHighRdy->OSTCBStkPtr - 0 -—> (free item) HIGH MEMORY

Here is the call graph for this function:

◆ OSInitHookBegin()

void OSInitHookBegin ( void  )

OS INITIALIZATION HOOK
This function is called by OSInit() at the beginning of OSInit().

OS INITIALIZATION HOOK (BEGINNING)

Description: This function is called by OSInit() at the beginning of OSInit().

Arguments : none

Note(s) : 1) Interrupts should be disabled during this call.

Here is the caller graph for this function:

◆ OSInitHookEnd()

void OSInitHookEnd ( void  )

OS INITIALIZATION HOOK
This This function is called by OSInit() at the end of OSInit().

OS INITIALIZATION HOOK (END)

Description: This function is called by OSInit() at the end of OSInit().

Arguments : none

Note(s) : 1) Interrupts should be disabled during this call.

Here is the caller graph for this function:

◆ OSIntCtxSw()

void OSIntCtxSw ( void  )

PERFORM A CONTEXT SWITCH (From an ISR)

Warning
Here is the call graph for this function:

◆ OSStartHighRdy()

void OSStartHighRdy ( void  )

START HIGHEST PRIORITY TASK.

Warning
Se debe ajustar en funcion de la plataforma
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OSTaskCreateHook()

void OSTaskCreateHook ( OS_TCB ptcb)

TASK CREATION HOOK
This function is called when a task is created.

Parameters
*ptcb
Warning
Permite ejecutar codigo propio antes de la creacion de una Tarea

◆ OSTaskDelHook()

void OSTaskDelHook ( OS_TCB ptcb)

TASK DELETION HOOK
This function is called when a task is deleted.

Parameters
*ptcb
Warning
Permite ejecutar codigo propio antes de la eliminacion de una Tarea

◆ OSTaskStatHook()

void OSTaskStatHook ( void  )

STATISTIC TASK HOOK
This function is called every second by uC/OS-II's statistics task. This allows your application to add functionality to the statistics task.

Warning

◆ OSTaskStkInit()

OS_STK* OSTaskStkInit ( void(*)(void *pd)  task,
void *  pdata,
OS_STK ptos,
INT16U  opt 
)

INITIALIZE A TASK'S STACK
This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the stack frame of the task being created. This function is highly processor specific.

Parameters
*task
*pdata
*ptos
opt
Warning
Permite ejecutar codigo propio antes de la creacion de una Tarea

◆ OSTaskSwHook()

void OSTaskSwHook ( void  )

TASK SWITCH HOOK
This function is called when a task switch is performed. This allows you to perform other operations during a context switch.

Warning
Here is the caller graph for this function:

◆ OSTCBInitHook()

void OSTCBInitHook ( struct os_tcb ptcb)

TICK HOOK.

Parameters
*ptcb
This function is called by OSTCBInit() after setting up most of the TCB.
Warning
Interrupts may or may not be ENABLED during this call

◆ OSTimeDly()

void OSTimeDly ( INT16U  ticks)

DELAY TASK 'n' TICKS (n from 0 to 65535) param ticks.

Warning
is the time delay that the task will be suspended in number of clock 'ticks'. Note that by specifying 0, the task will not be delayed.
Here is the caller graph for this function:

◆ OSTimeTickHook()

void OSTimeTickHook ( void  )

TICK HOOK
This function is called every tick.

Warning
Interrupts may or may not be ENABLED during this call.
Here is the caller graph for this function:

◆ OSVersion()

INT16U OSVersion ( void  )

GET VERSION.

Returns
the version number of uC/OS-II multiplied by 100.

Variable Documentation

◆ OSCtxSwCtr

OS_EXT INT32U OSCtxSwCtr

Counter of number of context switches

◆ OSIdleCtr

OS_EXT volatile INT32U OSIdleCtr

Idle counter

◆ OSIntExitY

OS_EXT INT8U OSIntExitY

Valor de Exit Y

◆ OSIntNesting

OS_EXT INT8U OSIntNesting

Interrupt nesting level

◆ OSLockNesting

OS_EXT INT8U OSLockNesting

Multitasking lock nesting level

◆ OSMapTbl

rom INT8U const OSMapTbl[]

Priority->Bit Mask lookup table

◆ OSPrioCur

OS_EXT INT8U OSPrioCur

Priority of current task

◆ OSPrioHighRdy

OS_EXT INT8U OSPrioHighRdy

Priority of highest priority task

◆ OSRdyGrp

OS_EXT INT8U OSRdyGrp

Ready list group

◆ OSRdyTbl

OS_EXT INT8U OSRdyTbl[OS_RDY_TBL_SIZE]

Table of tasks which are ready to run

◆ OSRunning

OS_EXT BOOLEAN OSRunning

Flag indicating that kernel is running

◆ OSTaskCtr

OS_EXT INT8U OSTaskCtr

Number of tasks created

◆ OSTaskIdleStk

OS_EXT OS_STK OSTaskIdleStk[OS_TASK_IDLE_STK_SIZE]

Idle task stack

◆ OSTCBCur

OS_EXT OS_TCB* OSTCBCur

Pointer to currently running TCB

◆ OSTCBFreeList

OS_EXT OS_TCB* OSTCBFreeList

Pointer to list of free TCBs

◆ OSTCBHighRdy

OS_EXT OS_TCB* OSTCBHighRdy

Pointer to highest priority TCB R-to-R

◆ OSTCBList

OS_EXT OS_TCB* OSTCBList

Pointer to doubly linked list of TCBs

◆ OSTCBPrioTbl

OS_EXT OS_TCB* OSTCBPrioTbl[OS_LOWEST_PRIO+1]

Table of pointers to created TCBs

◆ OSTCBTbl

Table of TCBs

◆ OSUnMapTbl

rom INT8U const OSUnMapTbl[]

Priority->Index lookup table