pub struct EventGroup { /* private fields */ }Expand description
Event group — a set of named bits that can be set, cleared, and waited on.
Implementations§
Source§impl EventGroup
impl EventGroup
Sourcepub fn set_bits(&self, bits: u32) -> u32
pub fn set_bits(&self, bits: u32) -> u32
Set bits in the event group. Returns the bits value after setting.
Sourcepub fn clear_bits(&self, bits: u32) -> u32
pub fn clear_bits(&self, bits: u32) -> u32
Clear bits in the event group. Returns the bits value before clearing.
Sourcepub fn wait_bits(
&self,
bits: u32,
flags: WaitFlags,
timeout_ms: u32,
) -> Result<u32>
pub fn wait_bits( &self, bits: u32, flags: WaitFlags, timeout_ms: u32, ) -> Result<u32>
Wait for the specified bits to be set in the event group.
flags is a combination of WaitFlags::WAIT_ALL and WaitFlags::CLEAR_ON_EXIT.
Returns the bits value at the moment the wait condition was satisfied.
§Errors
Returns Error::Timeout if the bits are not set within timeout_ms.
Sourcepub fn set_bits_from_isr(&self, bits: u32) -> u32
pub fn set_bits_from_isr(&self, bits: u32) -> u32
Set bits from an ISR context. Returns the bits value after setting.
Trait Implementations§
Source§impl Debug for EventGroup
impl Debug for EventGroup
Source§impl Drop for EventGroup
impl Drop for EventGroup
impl Send for EventGroup
impl Sync for EventGroup
Auto Trait Implementations§
impl Freeze for EventGroup
impl RefUnwindSafe for EventGroup
impl Unpin for EventGroup
impl UnwindSafe for EventGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more