Trait r3_core::kernel::event_group::EventGroupMethods
source · pub trait EventGroupMethods: EventGroupHandle {
// Provided methods
fn set(&self, bits: EventGroupBits) -> Result<(), UpdateEventGroupError> { ... }
fn clear(&self, bits: EventGroupBits) -> Result<(), UpdateEventGroupError> { ... }
fn get(&self) -> Result<EventGroupBits, GetEventGroupError> { ... }
fn wait(
&self,
bits: EventGroupBits,
flags: EventGroupWaitFlags
) -> Result<EventGroupBits, WaitEventGroupError> { ... }
fn wait_timeout(
&self,
bits: EventGroupBits,
flags: EventGroupWaitFlags,
timeout: Duration
) -> Result<EventGroupBits, WaitEventGroupTimeoutError> { ... }
fn poll(
&self,
bits: EventGroupBits,
flags: EventGroupWaitFlags
) -> Result<EventGroupBits, PollEventGroupError> { ... }
}
Expand description
The supported operations on EventGroupHandle
.
Provided Methods§
sourcefn set(&self, bits: EventGroupBits) -> Result<(), UpdateEventGroupError>
fn set(&self, bits: EventGroupBits) -> Result<(), UpdateEventGroupError>
Set the specified bits.
sourcefn clear(&self, bits: EventGroupBits) -> Result<(), UpdateEventGroupError>
fn clear(&self, bits: EventGroupBits) -> Result<(), UpdateEventGroupError>
Clear the specified bits.
sourcefn get(&self) -> Result<EventGroupBits, GetEventGroupError>
fn get(&self) -> Result<EventGroupBits, GetEventGroupError>
Get the currently set bits.
sourcefn wait(
&self,
bits: EventGroupBits,
flags: EventGroupWaitFlags
) -> Result<EventGroupBits, WaitEventGroupError>
fn wait( &self, bits: EventGroupBits, flags: EventGroupWaitFlags ) -> Result<EventGroupBits, WaitEventGroupError>
Wait for all or any of the specified bits to be set. Optionally, clear the specified bits.
Returns the currently set bits. If EventGroupWaitFlags::CLEAR
is
specified, this method returns the bits before clearing.
This system service may block. Therefore, calling this method is not
allowed in a non-waitable context and will return Err(BadContext)
.
sourcefn wait_timeout(
&self,
bits: EventGroupBits,
flags: EventGroupWaitFlags,
timeout: Duration
) -> Result<EventGroupBits, WaitEventGroupTimeoutError>
fn wait_timeout( &self, bits: EventGroupBits, flags: EventGroupWaitFlags, timeout: Duration ) -> Result<EventGroupBits, WaitEventGroupTimeoutError>
wait
with timeout.
sourcefn poll(
&self,
bits: EventGroupBits,
flags: EventGroupWaitFlags
) -> Result<EventGroupBits, PollEventGroupError>
fn poll( &self, bits: EventGroupBits, flags: EventGroupWaitFlags ) -> Result<EventGroupBits, PollEventGroupError>
Non-blocking version of wait
. Returns immediately with
PollEventGroupError::Timeout
if the unblocking condition is not
satisfied.