Published 03 Dec 2010, by
Eric Ebert
CoOS,
rtos
API header file of CooCox CoOS.
More...
Go to the source code of this file.
Detailed Description
API header file of CooCox CoOS.
- Version:
- V1.1.3
- Date:
- 2010.04.26
This file including all API functions's declare of CooCox CoOS.
INTERNAL FILE,DON'T PUBLIC.
© COPYRIGHT 2009 CooCox
Definition in file CoOS.h.
Define Documentation
Delete always.
Definition at line 89 of file CoOS.h.
| #define OPT_DEL_NO_PEND 0 |
Delete when no task waitting for
Definition at line 88 of file CoOS.h.
Wait for all flags.
Definition at line 82 of file CoOS.h.
Wait for any one of flags.
Definition at line 83 of file CoOS.h.
Waot for one flag.
Definition at line 84 of file CoOS.h.
Function Documentation
| StatusType CoActivateTask |
( |
OS_TID |
taskID, |
|
|
void * |
argv |
|
) |
| |
Activate Task.
- Parameters:
-
| [in] | taskID | Task ID |
| [in] | argv | Task argv |
| [out] | None | |
- Return values:
-
| E_INVALID_ID | Invalid task ID. |
| E_OK | Activate task successful. |
- Description
This function is called to activate current task.
Definition at line 1074 of file task.c.
| StatusType CoDelTask |
( |
OS_TID |
taskID ) |
|
Delete Task.
- Parameters:
-
| [in] | taskID | Task ID |
| [out] | None | |
- Return values:
-
| E_INVALID_ID | Invalid task ID. |
| E_PROTECTED_TASK | Protected task in OS. |
| E_OK | Delete successful. |
- Description
This function is called to delete assign task.
Definition at line 946 of file task.c.
Enter a ISR.
Enter a ISR
- Parameters:
-
- Return values:
-
- Description
This function is called to notify OS when enter to an ISR.
- Note:
- When you call API in ISR,you must call CoEnterISR() before your interrupt handler code,and call CoExitISR() after your handler code and before exiting from ISR.
Definition at line 40 of file core.c.
Exit a ISR.
Exit a ISR
- Parameters:
-
- Return values:
-
- Description
This function is called when exit from a ISR.
- Note:
Definition at line 59 of file core.c.
Exit Task.
- Parameters:
-
- Return values:
-
- Description
This function is called to exit current task.
Definition at line 1054 of file task.c.
| OS_TID CoGetCurTaskID |
( |
void |
) |
|
Get current task id.
- Parameters:
-
- Return values:
-
- Description
This function is called to get current task id.
Definition at line 1116 of file task.c.
| OS_VER CoGetOSVersion |
( |
void |
) |
|
Get OS version.
Get OS version value
- Parameters:
-
- Return values:
-
| The | value is version of OS mutipled by 100. |
- Description
This function is used to return the version number of CooCox OS. the return value corresponds to CooCox's version number multiplied by 100. In other words, version 1.02 would be returned as 102.
Definition at line 234 of file core.c.
| void CoIdleTask |
( |
void * |
pdata ) |
|
IDLE task of OS.
- Parameters:
-
| [in] | pdata | The parameter passed to IDLE task. |
| [out] | None | |
- Return values:
-
- Description
This function is system IDLE task code.
Definition at line 31 of file hook.c.
Initialize OS.
Initialize OS
- Parameters:
-
- Return values:
-
- Description
This function is called to initialize OS.
- Note:
- You must call this function first,before any other OS API function
There is a example for useage of this function,as follows:
e.g.
...
OsInit();
CreateTask(...);
...
OsStart();
Definition at line 173 of file core.c.
| void CoSchedLock |
( |
void |
) |
|
Lock schedule.
- Parameters:
-
- Return values:
-
- Description
This function is called in application code to lock schedule.
- Note:
Definition at line 125 of file core.c.
| void CoSchedUnlock |
( |
void |
) |
|
Unlock schedule.
- Parameters:
-
- Return values:
-
- Description
This function is called in APP to unlock schedule.
- Note:
Definition at line 144 of file core.c.
Start multitask.
Start multitask
- Parameters:
-
- Return values:
-
- Description
This function is called to start multitask.After it is called, OS start schedule task by priority or/and time slice.
- Note:
- This function must be called to start OS when you use CoOS,and must call after CoOsInit().
Definition at line 211 of file core.c.
| void CoStkOverflowHook |
( |
OS_TID |
taskID ) |
|
Hook for stack overflow.
- Parameters:
-
| [in] | taskID | Piont to the task which lead to stack overflow. |
| [out] | None | |
- Return values:
-
- Description
This function is a hook for stack overflow.
Definition at line 52 of file hook.c.
| OS_TID CreateTask |
( |
FUNCPtr |
task, |
|
|
void * |
argv, |
|
|
U32 |
parameter, |
|
|
OS_STK * |
stk |
|
) |
| |
Create a task.
- Parameters:
-
| [in] | task | Task code entry. |
| [in] | argv | The parameter passed to task. |
| [in] | parameter | Task priority + stack size + time slice + isWaitting. |
| [in] | stk | Pointer to stack top of task. |
| [out] | None | |
- Return values:
-
| E_CREATE_FAIL | Fail to create a task . |
| others | Valid task id. |
- Description
This function is called by application to create a task,return a id to mark this task.
Definition at line 822 of file task.c.