<< Previous | Next >> | |
|
OS_FLAGS OSFlagAccept( OS_FLAG_GRP * pgrp, OS_FLAGS flags, INT8U wait_type, INT8U * err );
Description
- This function is called to check the status of a combination of bits to be set or cleared in an event flag group. Your application can check for ANY bit to be set/cleared or ALL bits to be set/cleared.
- This call does not block if the desired flags are not present.
Parameters
- pgrp
- Pointer to the desired event flag group.
- flags
- Bit pattern indicating which bit(s) (i.e. flags) you wish to check. E.g., if your application wants to wait for bits 0 and 1 then
flags
should be 0x03.
- wait_type
- Specifies whether you are checking for ALL bits to be set/cleared or ANY of the bits to be set/cleared. You can specify the following argument:
NOTE Add OS_FLAG_CONSUME
if you want the event flag to be consumed by the call. Example, to wait for any flag in a group AND then clear the flags that are present, set thewait_type
parameter to:
OS_FLAG_WAIT_SET_ANY
+OS_FLAG_CONSUME
- err
- Pointer to an error code. Possible values are:
Return value
- The state of the flags in the event flag group.
Library
- OS_FLAG.C (Prior to DC 8:UCOS2.LIB)
Dynamic C Functions | << Previous | Next >> | rabbit.com |