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.
Flag management implementation code of coocox CoOS kernel. More...
Go to the source code of this file.
Functions | |
| static void | FlagBlock (P_FLAG_NODE pnode, U32 flags, U8 waitType) |
| Block a task to wait a flag event. | |
| static P_FLAG_NODE | RemoveFromLink (P_FLAG_NODE pnode) |
| Remove a flag node from list. | |
| OS_FlagID | CoCreateFlag (BOOL bAutoReset, BOOL bInitialState) |
| Create a flag. | |
| StatusType | CoDelFlag (OS_FlagID id, U8 opt) |
| Delete a flag. | |
| StatusType | CoAcceptSingleFlag (OS_FlagID id) |
| AcceptSingleFlag. | |
| U32 | CoAcceptMultipleFlags (U32 flags, U8 waitType, StatusType *perr) |
| AcceptMultipleFlags. | |
| StatusType | CoWaitForSingleFlag (OS_FlagID id, U32 timeout) |
| WaitForSingleFlag. | |
| U32 | CoWaitForMultipleFlags (U32 flags, U8 waitType, U32 timeout, StatusType *perr) |
| WaitForMultipleFlags. | |
| StatusType | CoClearFlag (OS_FlagID id) |
| Clear a Flag. | |
| StatusType | CoSetFlag (OS_FlagID id) |
| Set a flag. | |
| StatusType | isr_SetFlag (OS_FlagID id) |
| Set a flag in ISR. | |
| void | RemoveLinkNode (P_FLAG_NODE pnode) |
| Remove a flag node from list. | |
Variables | |
| FCB | FlagCrl = {0} |
Detailed Description
Flag 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 flag.c.
Function Documentation
| U32 CoAcceptMultipleFlags | ( | U32 | flags, |
| U8 | waitType, | ||
| StatusType * | perr | ||
| ) |
| StatusType CoAcceptSingleFlag | ( | OS_FlagID | id ) |
| StatusType CoClearFlag | ( | OS_FlagID | id ) |
| OS_FlagID CoCreateFlag | ( | BOOL | bAutoReset, |
| BOOL | bInitialState | ||
| ) |
Create a flag.
- Parameters:
-
[in] bAutoReset Reset mode,TRUE(Auto Reset) FLASE(Manual Reset). [in] bInitialState Initial state. [out] None
- Return values:
-
E_CREATE_FAIL Create flag fail. others Create flag successful.
- Description
This function use to create a event flag.
- Note:
| StatusType CoDelFlag | ( | OS_FlagID | id, |
| U8 | opt | ||
| ) |
Delete a flag.
- Parameters:
-
[in] id Flag ID. [in] opt Delete option. [out] None
- Return values:
-
E_CALL Error call in ISR. E_INVALID_ID Invalid event ID. E_TASK_WAITTING Tasks waitting for the event,delete fail. E_OK Event deleted successful.
- Description
This function is called to delete a event flag.
- Note:
| StatusType CoSetFlag | ( | OS_FlagID | id ) |
| U32 CoWaitForMultipleFlags | ( | U32 | flags, |
| U8 | waitType, | ||
| U32 | timeout, | ||
| StatusType * | perr | ||
| ) |
WaitForMultipleFlags.
- Parameters:
-
[in] flags Flags that waiting to active task. [in] waitType Flags wait type. [in] timeout The longest time for writting flag. [out] perr A pointer to error code.
- Return values:
-
0 springFlag
- Description
This function is called to pend a task for waitting multiple flag.
- Note:
| StatusType CoWaitForSingleFlag | ( | OS_FlagID | id, |
| U32 | timeout | ||
| ) |
WaitForSingleFlag.
- Parameters:
-
[in] id Flag ID. [in] timeout The longest time for writting flag. [out] None
- Return values:
-
E_CALL Error call in ISR. E_INVALID_ID Invalid event ID. E_TIMEOUT Flag wasn't received within 'timeout' time. E_OK The call was successful and your task owns the Flag, or the event you are waiting for occurred.
- Description
This function is called to wait for only one flag, (1) if parameter "timeout" == 0,waiting until flag be set; (2) when "timeout" != 0,if flag was set or wasn't set but timeout occured,the task will exit the waiting list,convert to READY or RUNNING state.
- Note:
| static void FlagBlock | ( | P_FLAG_NODE | pnode, |
| U32 | flags, | ||
| U8 | waitType | ||
| ) | [static] |
Block a task to wait a flag event.
- Parameters:
-
[in] pnode A node that will link into flag waiting list. [in] flags Flag(s) that the node waiting for. [in] waitType Waiting type of the node. [out] None
- Return values:
-
None
- Description
This function is called to block a task to wait a flag event.
- Note:
| StatusType isr_SetFlag | ( | OS_FlagID | id ) |
| static P_FLAG_NODE RemoveFromLink | ( | P_FLAG_NODE | pnode ) | [static] |
| void RemoveLinkNode | ( | P_FLAG_NODE | pnode ) |
Variable Documentation
Generated on Tue Jul 12 2022 15:09:52 by
1.7.2