OS_FLAGS OSFlagPost (OS_FLAG_GRP *p_grp
,
OS_FLAGS flags,
OS_OPT opt,
OS_ERR *p_err)
File | Called from | Code enabled by |
---|---|---|
| Task or ISR |
|
...
Description
Sets or rlears event flag bits. The bits set or cleared are specified in a bit mask (i.e., the flags argument). OSFlagPost()
readies each task that has its desired bits satisfied by this call. The caller can set or clear bits that are already set or cleared.
Files
os.h/os_flag.c
Prototype
Arguments
p_grp
is a pointer to the event flag group.
...
The new value of the event flags.
Required Configuration
OS_CFG_FLAG_EN
must be enabled in os_cfg.h. Refer to µC/OS-III Configuration Manual
Callers
Application and ISRs.
Notes/Warnings
- Event flag groups must be created before they are used.
- The execution time of this function depends on the number of tasks waiting on the event flag group. However, the execution time is still deterministic.
- Although the example below shows that we are posting from a task,
OSFlagPost()
can also be called from an ISR.
Example