...
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 |
|
...
You can set or clear event flag bits by calling OSFlagPost()
. 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.anchor
Arguments
...
p_grp
anchoris a pointer to the event flag group.
...
flags
1000339 Anchor
specifies which bits to be set or cleared. If opt
is OS_OPT_POST_FLAG_SET
, each bit that is set in flags
will set the corresponding bit in the event flag group. For example to set bits 0, 4, and 5, you would set flags
to 0x31
(note that bit 0 is the least significant bit). If opt is OS_OPT_POST_FLAG_CLR
, each bit that is set in flags
will clear the corresponding bit in the event flag group. For example to clear bits 0, 4, and 5, you would specify flags
as 0x31
(again, bit 0 is the least significant bit).
Anchor
opt
indicates whether the flags are set (OS_OPT_POST_FLAG_SET
) or cleared (OS_OPT_POST_FLAG_CLR
).
...
The caller may also “add” OS_OPT_POST_NO_SCHED
so that µC/OS-III will not call the scheduler after the post.
...
p_err
Anchor
is a pointer to an error code and can be:
...
class | WebWorks_Indent_1 |
---|
...
...
OS_ERR_NONE
...
class | WebWorks_Indent_2 |
---|
...
the call is successful.
...
class | WebWorks_Indent_1 |
---|
...
...
OS_ERR_FLAG_INVALID_OPT
...
class | WebWorks_Indent_2 |
---|
...
if OS_CFG_ARG_CHK_EN
is set to 1
in os_cfg.h
: if you specified an invalid option.
...
...
OS_ERR_OBJ_PTR_NULL
...
class | WebWorks_Indent_2 |
---|
...
if OS_CFG_ARG_CHK_EN
is set to 1
in os_cfg.h
: if the caller passed a NULL
pointer.
...
class | WebWorks_Indent_1 |
---|
...
OS_ERR_OBJ_TYPE
...
...
if OS_CFG_OBJ_TYPE_CHK_EN
is set to 1
in os_cfg.h
: p_grp
is not pointing to an event flag group.
...
Returned Value
Anchor
Notes/Warnings
...
Example
...
rowspan | 21 |
---|
...