An OS_FLAGS object is used to set, clear, and pend on a set of flags that is held and maintained by the object.
More...
#include <nbrtos.h>
|
| OS_FLAGS () |
| Create and initialize an OS_FLAG object.
|
|
void | Init () |
| Initialize an OS_FLAG object to its default value.
|
|
void | Set (uint32_t bits_to_set) |
| This function sets the corresponding bits asserted in bits_to_set . More...
|
|
void | Clear (uint32_t bits_to_clr) |
| This function clears the bits asserted in bits_to_clr . More...
|
|
void | Write (uint32_t bits_to_force) |
| This function forces the bits to match the passe din bits`. More...
|
|
uint8_t | PendAny (uint32_t bit_mask, uint16_t timeout=WAIT_FOREVER) |
| This function waits a number of time ticks specified by timeout until any of the flags indicated by bit_mask are set. More...
|
|
uint8_t | PendAnyNoWait (uint32_t bit_mask) |
| This function immediately checks to see if any of the flag bits indicated by bit_mask are set; it does not wait. More...
|
|
uint8_t | PendAll (uint32_t bit_mask, uint16_t timeout=WAIT_FOREVER) |
| This function waits a number of time ticks specified by timeout until all the flags indicated by bit_mask are set. More...
|
|
uint8_t | PendAllNoWait (uint32_t bit_mask) |
| This function immediately checks to see if all the flag bits indicated by bit_mask are set; it does not wait. More...
|
|
uint32_t | State () |
| This function returns the current values of the flags stored in the OS_FLAGS object structure. More...
|
|
An OS_FLAGS object is used to set, clear, and pend on a set of flags that is held and maintained by the object.
◆ Clear()
void OS_FLAGS::Clear |
( |
uint32_t |
bits_to_clr | ) |
|
This function clears the bits asserted in bits_to_clr
.
- Parameters
-
bits_to_clr | A bit or set of bits to be cleared. |
- See also
- Set()
-
State()
◆ PendAll()
uint8_t OS_FLAGS::PendAll |
( |
uint32_t |
bit_mask, |
|
|
uint16_t |
timeout = WAIT_FOREVER |
|
) |
| |
|
inline |
This function waits a number of time ticks specified by timeout
until all the flags indicated by bit_mask
are set.
- Parameters
-
bit_mask | A bit or set of bits to wait on. |
timeout | Number of time ticks to wait for all specified flag bits to be set. |
- Return values
-
OS_NO_ERR | If the flags condition is satisfied |
OS_TIMEOUT | If the timeout expired |
- See also
- PendAllNoWait()
-
PendAny()
◆ PendAllNoWait()
uint8_t OS_FLAGS::PendAllNoWait |
( |
uint32_t |
bit_mask | ) |
|
This function immediately checks to see if all the flag bits indicated by bit_mask
are set; it does not wait.
- Parameters
-
bit_mask | A bit or set of bits to wait on. |
- Return values
-
OS_NO_ERR | All flags indicated by bit_mask are set. |
OS_TIMEOUT | Not all of the flags indicated by bit_mask are set. |
- See also
- PendAll()
-
PendAnyNoWait()
◆ PendAny()
uint8_t OS_FLAGS::PendAny |
( |
uint32_t |
bit_mask, |
|
|
uint16_t |
timeout = WAIT_FOREVER |
|
) |
| |
|
inline |
This function waits a number of time ticks specified by timeout
until any of the flags indicated by bit_mask
are set.
- Parameters
-
bit_mask | A bit or set of bits to wait on. |
timeout | Number of time ticks to wait for all specified flag bits to be set. |
- Return values
-
OS_NO_ERR | At least one of the flag bits are set before timeout expires. |
OS_TIMEOUT | None of the flag bits are set before timeout expires. |
- See also
- PendAnyNoWait()
-
PendAll()
◆ PendAnyNoWait()
uint8_t OS_FLAGS::PendAnyNoWait |
( |
uint32_t |
bit_mask | ) |
|
This function immediately checks to see if any of the flag bits indicated by bit_mask
are set; it does not wait.
- Parameters
-
bit_mask | A bit or set of bits to wait on. |
- Return values
-
OS_NO_ERR | At least one of the flags indicated by bit_mask are set. |
OS_TIMEOUT | None of the flags indicated by bit_mask are set. |
- See also
- PendAny()
-
PendAllNoWait()
◆ Set()
void OS_FLAGS::Set |
( |
uint32_t |
bits_to_set | ) |
|
This function sets the corresponding bits asserted in bits_to_set
.
- Parameters
-
bits_to_set | A bit or set of bits to be set. |
- See also
- Clear()
-
State()
◆ State()
uint32_t OS_FLAGS::State |
( |
| ) |
|
This function returns the current values of the flags stored in the OS_FLAGS object structure.
- Returns
- The state of the OS_FLAGS object.
- See also
- Set()
-
Clear()
◆ Write()
void OS_FLAGS::Write |
( |
uint32_t |
bits_to_force | ) |
|
This function forces the bits to match the passe din bits`.
- Parameters
-
bits_to_force | Value to set all flags to. |
- See also
- Set()
-
Clear()
-
State()
The documentation for this class was generated from the following files: