Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
timer management implementation code of CooCox CoOS kernel. More...
Go to the source code of this file.
Functions | |
| static void | InsertTmrList (OS_TCID tmrID) |
| Insert a timer into the timer list. | |
| static void | RemoveTmrList (OS_TCID tmrID) |
| Remove a timer from the timer list. | |
| OS_TCID | CoCreateTmr (U8 tmrType, U32 tmrCnt, U32 tmrReload, vFUNCPtr func) |
| Create a timer. | |
| StatusType | CoStartTmr (OS_TCID tmrID) |
| Start counter. | |
| StatusType | CoStopTmr (OS_TCID tmrID) |
| Stop countering for a spcify timer. | |
| StatusType | CoDelTmr (OS_TCID tmrID) |
| Delete a timer. | |
| U32 | CoGetCurTmrCnt (OS_TCID tmrID, StatusType *perr) |
| Get current counter of specify timer. | |
| StatusType | CoSetTmrCnt (OS_TCID tmrID, U32 tmrCnt, U32 tmrReload) |
| Setting for a specify timer. | |
| void | TmrDispose (void) |
| Timer counter dispose. | |
| void | isr_TmrDispose (void) |
| Timer counter dispose in ISR. | |
Variables | |
| TmrCtrl | TmrTbl [CFG_MAX_TMR] = {{0}} |
| P_TmrCtrl | TmrList = 0 |
| U32 | TmrIDVessel = 0 |
Detailed Description
timer management implementation code of CooCox CoOS kernel.
- Version:
- V1.1.3
- Date:
- 2010.04.26
INTERNAL FILE,DON'T PUBLIC.
© COPYRIGHT 2009 CooCox
Definition in file timer.c.
Function Documentation
| OS_TCID CoCreateTmr | ( | U8 | tmrType, |
| U32 | tmrCnt, | ||
| U32 | tmrReload, | ||
| vFUNCPtr | func | ||
| ) |
Create a timer.
- Parameters:
-
[in] tmrType Specify timer's type. [in] tmrCnt Specify timer initial counter value. [in] tmrReload Specify timer reload value. [in] func Specify timer callback function entry. [out] None
- Return values:
-
E_CREATE_FAIL Create timer fail. others Create timer successful.
- Description
This function is called to create a timer.
| StatusType CoDelTmr | ( | OS_TCID | tmrID ) |
Delete a timer.
- Parameters:
-
[in] tmrID Specify a timer which deleted. [out] None
- Return values:
-
E_INVALID_ID The timer id passed was invalid,deleted failure. E_OK Delete a timer successful.
- Description
This function is called to delete a timer which created before.
| U32 CoGetCurTmrCnt | ( | OS_TCID | tmrID, |
| StatusType * | perr | ||
| ) |
Get current counter of specify timer.
- Parameters:
-
[in] tmrID Specify timer by ID. [out] E_INVALID_ID Invalid ID was passed and get counter failure. [out] E_OK Get current counter successful.
- Return values:
-
Current counter of a timer which specify by id.
- Description
This function is called to obtain current counter of specify timer.
| StatusType CoSetTmrCnt | ( | OS_TCID | tmrID, |
| U32 | tmrCnt, | ||
| U32 | tmrReload | ||
| ) |
Setting for a specify timer.
- Parameters:
-
[in] tmrID Specify timer by ID. [in] tmrCnt Specify timer counter which need to be set. [in] tmrReload Specify timer reload value which need to be set. [out] None
- Return values:
-
E_INVALID_ID The ID passed was invalid,set fail. E_OK Set timer counter successful.
- Description
This function is called to set timer counter and reload value.
| StatusType CoStartTmr | ( | OS_TCID | tmrID ) |
Start counter.
- Parameters:
-
[in] tmrID Specify a timer which startted. [out] None
- Return values:
-
E_INVALID_ID The timer id passed was invalid,can't start timer E_OK Insert a timer to timer list and start it successful.
- Description
This function is called to make a timer start countering.
| StatusType CoStopTmr | ( | OS_TCID | tmrID ) |
Stop countering for a spcify timer.
- Parameters:
-
[in] tmrID Specify a timer which stopped. [out] None
- Return values:
-
E_INVALID_ID The timer id passed was invalid, stop failure. E_OK Stop a timer countering successful.
- Description
This function is called to stop a timer from counting.
| static void InsertTmrList | ( | OS_TCID | tmrID ) | [static] |
Insert a timer into the timer list.
- Parameters:
-
[in] tmrID Specify timer ID which insertted. [out] None
- Return values:
-
E_INVALID_ID Timer ID passed was invalid,insert fail. E_OK Insert successful.
- Description
This function is called to insert a timer into the timer list.
| void isr_TmrDispose | ( | void | ) |
| static void RemoveTmrList | ( | OS_TCID | tmrID ) | [static] |
| void TmrDispose | ( | void | ) |
Variable Documentation
| U32 TmrIDVessel = 0 |
Generated on Tue Jul 12 2022 15:09:52 by
1.7.2