CooCox 1.1.4 on mbed with simple blinky example

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

time.c File Reference

time.c File Reference

time management implementation code of CooCox CoOS kernel. More...

Go to the source code of this file.

Functions

void InsertDelayList (P_OSTCB ptcb, U32 ticks)
 Insert into DELAY list.
void RemoveDelayList (P_OSTCB ptcb)
 Remove from the DELAY list.
U64 CoGetOSTime (void)
 Get current ticks.
StatusType CoTickDelay (U32 ticks)
 Delay current task for specify ticks number.
StatusType CoResetTaskDelayTick (OS_TID taskID, U32 ticks)
 Reset task delay ticks.
StatusType CoTimeDelay (U8 hour, U8 minute, U8 sec, U16 millsec)
 Delay current task for detail time.
void TimeDispose (void)
 Dispose time delay.
void isr_TimeDispose (void)
 Dispose time delay in ISR.

Variables

P_OSTCB DlyList = 0

Detailed Description

time management 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 time.c.


Function Documentation

U64 CoGetOSTime ( void   )

Get current ticks.

Parameters:
[in]None
[out]None
Return values:
Returncurrent system tick counter.
Description

This function is called to obtain current system tick counter.

Definition at line 155 of file time.c.

StatusType CoResetTaskDelayTick ( OS_TID  taskID,
U32  ticks 
)

Reset task delay ticks.

Parameters:
[in]ptcbTask that want to insert into DELAY list.
[in]ticksSpecify system tick number which will delay .
[out]None
Return values:
E_CALLError call in ISR.
E_INVALID_IDInvalid task id.
E_NOT_IN_DELAY_LISTTask not in delay list.
E_OKThe current task was inserted to DELAY list successful,it will delay for specify time.
Description

This function delay specify ticks for current task.

Definition at line 216 of file time.c.

StatusType CoTickDelay ( U32  ticks )

Delay current task for specify ticks number.

Parameters:
[in]ticksSpecify system tick number which will delay.
[out]None
Return values:
E_CALLError call in ISR.
E_OKThe current task was insert to DELAY list successful,it will delay specify time.
Description

This function delay specify ticks for current task.

Note:
This function be called in ISR,do nothing and return immediately.

Definition at line 175 of file time.c.

StatusType CoTimeDelay ( U8  hour,
U8  minute,
U8  sec,
U16  millsec 
)

Delay current task for detail time.

Parameters:
[in]hourSpecify the number of hours.
[in]minuteSpecify the number of minutes.
[in]secSpecify the number of seconds.
[in]millsecSpecify the number of millseconds.
[out]None
Return values:
E_CALLError call in ISR.
E_INVALID_PARAMETERParameter passed was invalid,delay fail.
E_OKThe current task was inserted to DELAY list successful,it will delay for specify time.
Description

This function delay specify time for current task.

Note:
If this function called in ISR,do nothing and return immediately.

Definition at line 275 of file time.c.

void InsertDelayList ( P_OSTCB  ptcb,
U32  ticks 
)

Insert into DELAY list.

Parameters:
[in]ptcbTask that want to insert into DELAY list.
[in]ticksDelay system ticks.
[out]None
Return values:
None.
Description

This function is called to insert task into DELAY list.

Definition at line 40 of file time.c.

void isr_TimeDispose ( void   )

Dispose time delay in ISR.

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

This function is called in systick interrupt to dispose time delay of all task.

Definition at line 362 of file time.c.

void RemoveDelayList ( P_OSTCB  ptcb )

Remove from the DELAY list.

Parameters:
[in]ptcbTask that want to remove from the DELAY list.
[out]None
Return values:
None
Description

This function is called to remove task from the DELAY list.

Definition at line 111 of file time.c.

void TimeDispose ( void   )

Dispose time delay.

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

This function is called to dispose time delay of all task.

Definition at line 314 of file time.c.


Variable Documentation

Header pointer to the DELAY list.

Definition at line 24 of file time.c.