pub trait EventGroupMethods: EventGroupHandle {
    // Provided methods
    fn set(&self, bits: u32) -> Result<(), UpdateEventGroupError> { ... }
    fn clear(&self, bits: u32) -> Result<(), UpdateEventGroupError> { ... }
    fn get(&self) -> Result<u32, GetEventGroupError> { ... }
    fn wait(
        &self,
        bits: u32,
        flags: EventGroupWaitFlags
    ) -> Result<u32, WaitEventGroupError> { ... }
    fn wait_timeout(
        &self,
        bits: u32,
        flags: EventGroupWaitFlags,
        timeout: Duration
    ) -> Result<u32, WaitEventGroupTimeoutError> { ... }
    fn poll(
        &self,
        bits: u32,
        flags: EventGroupWaitFlags
    ) -> Result<u32, PollEventGroupError> { ... }
}
Expand description

The supported operations on EventGroupHandle.

Provided Methods§

source

fn set(&self, bits: u32) -> Result<(), UpdateEventGroupError>

Set the specified bits.

source

fn clear(&self, bits: u32) -> Result<(), UpdateEventGroupError>

Clear the specified bits.

source

fn get(&self) -> Result<u32, GetEventGroupError>

Get the currently set bits.

source

fn wait( &self, bits: u32, flags: EventGroupWaitFlags ) -> Result<u32, 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).

source

fn wait_timeout( &self, bits: u32, flags: EventGroupWaitFlags, timeout: Duration ) -> Result<u32, WaitEventGroupTimeoutError>

wait with timeout.

source

fn poll( &self, bits: u32, flags: EventGroupWaitFlags ) -> Result<u32, PollEventGroupError>

Non-blocking version of wait. Returns immediately with PollEventGroupError::Timeout if the unblocking condition is not satisfied.

Implementors§