EtcPal
HEAD (unstable)
ETC Platform Abstraction Layer (EtcPal)
|
View other versions:
|
A wrapper class for the EtcPal event group type.
Example usage:
See event_group (Event Groups) for more information.
Public Member Functions | |
EventGroup () | |
Create a new event group. | |
~EventGroup () | |
Destroy the event group. | |
EventGroup (const EventGroup &other)=delete | |
EventGroup & | operator= (const EventGroup &other)=delete |
EventGroup (EventGroup &&other)=delete | |
EventGroup & | operator= (EventGroup &&other)=delete |
EventBits | Wait (EventBits bits, int flags=0) |
Wait for one or more bits in an event group. More... | |
EventBits | TryWait (EventBits bits, int flags=0, int timeout_ms=0) |
Wait for one or more bits in an event group until a timeout expires. More... | |
void | SetBits (EventBits bits_to_set) |
Set one or more bits in an event group. More... | |
EventBits | GetBits () |
Get the current bitfield from an event group. | |
void | ClearBits (EventBits bits_to_clear) |
Clear one or more bits in an event group. More... | |
void | SetBitsFromIsr (EventBits bits_to_set) |
Set one or more bits in an event group from an interrupt context. More... | |
EventBits | GetBitsFromIsr () |
Get the current bitfield from an event group from an interrupt context. More... | |
void | ClearBitsFromIsr (EventBits bits_to_clear) |
Clear one or more bits in an event group from an interrupt context. More... | |
etcpal_event_group_t & | get () |
Get a reference to the underlying etcpal_event_group_t type. | |
|
inline |
Clear one or more bits in an event group.
bits_to_clear | Mask of bits to clear. |
|
inline |
Clear one or more bits in an event group from an interrupt context.
NOTE: Only meaningful on some platforms. See the table in event_group (Event Groups) and the description of etcpal_event_group_clear_bits_from_isr() for more information. On platforms on which it is not meaningful, executes the equivalent of ClearBits().
bits_to_clear | Mask of bits to clear. |
|
inline |
Get the current bitfield from an event group from an interrupt context.
NOTE: Only meaningful on some platforms. See the table in event_group (Event Groups) and the description of etcpal_event_group_get_bits_from_isr() for more information. On platforms on which it is not meaningful, executes the equivalent of GetBits().
|
inline |
Set one or more bits in an event group.
See etcpal_event_group_set_bits() for more information.
bits_to_set | Mask of bits in the event group to set. |
|
inline |
Set one or more bits in an event group from an interrupt context.
NOTE: Only meaningful on some platforms. See the table in event_group (Event Groups) and the description of etcpal_event_group_set_bits_from_isr() for more information. On platforms on which it is not meaningful, executes the equivalent of SetBits().
bits_to_set | Mask of bits in the event group to set. |
Wait for one or more bits in an event group until a timeout expires.
NOTE: Timeouts other than 0 or ETCPAL_WAIT_FOREVER are typically only honored on real-time platforms. See the table in event_group (Event Groups) for more information. On platforms where timeouts are not honored, passing 0 for timeout_ms returns the state of the event bits immediately, while any other value executes the equivalent of Wait().
bits | Mask of bits in the event group to wait for. |
flags | Flags that define waiting options. |
timeout_ms | Maximum amount of time to wait for the event bits, in milliseconds. If ETCPAL_WAIT_FOREVER is given, the result is the same as if Wait() was called. |
Wait for one or more bits in an event group.
bits | Mask of bits in the event group to wait for. |
flags | Flags that define waiting options. |