CooCox 1.1.4 on mbed with simple blinky example

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

core.c File Reference

core.c File Reference

Core implementation code of CooCox CoOS kernel. More...

Go to the source code of this file.

Functions

void CoEnterISR (void)
 Enter a ISR.
void CoExitISR (void)
 Exit a ISR.
void OsSchedUnlock (void)
 Unlock schedule.
void CoSchedLock (void)
 Lock schedule.
void CoSchedUnlock (void)
 Unlock schedule.
void CoInitOS (void)
 Initialize OS.
void CoStartOS (void)
 Start multitask.
OS_VER CoGetOSVersion (void)
 Get OS version.

Variables

volatile U8 OSIntNesting = 0
volatile U8 OSSchedLock = 0

Detailed Description

Core implementation code of CooCox CoOS kernel.

Version:
V1.1.4
Date:
2011.04.20

INTERNAL FILE,DON'T PUBLIC.

© COPYRIGHT 2009 CooCox

Definition in file core.c.


Function Documentation

void CoEnterISR ( void   )

Enter a ISR.

Parameters:
[in]None
[out]None
Return values:
None
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.

void CoExitISR ( void   )

Exit a ISR.

Parameters:
[in]None
[out]None
Return values:
None
Description

This function is called when exit from a ISR.

Note:

Definition at line 59 of file core.c.

OS_VER CoGetOSVersion ( void   )

Get OS version.

Parameters:
[in]None
[out]None
Return values:
Thevalue 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 CoInitOS ( void   )

Initialize OS.

Parameters:
[in]None
[out]None
Return values:
None
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.                                                             
            ...                   // Your target initial code. 
                
            OsInit();             // Initial OS.                
            CreateTask(...);      // Create tasks.              
            ...
            OsStart();            // Start multitask.

Definition at line 173 of file core.c.

void CoSchedLock ( void   )

Lock schedule.

Parameters:
[in]None
[out]None
Return values:
None
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:
[in]None
[out]None
Return values:
None
Description

This function is called in APP to unlock schedule.

Note:

Definition at line 144 of file core.c.

void CoStartOS ( void   )

Start multitask.

Parameters:
[in]None
[out]None
Return values:
None
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 OsSchedUnlock ( void   )

Unlock schedule.

Parameters:
[in]None
[out]None
Return values:
None
Description

This function is called to unlock schedule(i.e.enable schedule again)

Note:

Definition at line 88 of file core.c.


Variable Documentation

volatile U8 OSIntNesting = 0

Use to indicate interrupt nesting level

Definition at line 20 of file core.c.

volatile U8 OSSchedLock = 0

Task Switch lock.

Definition at line 21 of file core.c.