Struct freertos_rs::Semaphore
[−]
[src]
pub struct Semaphore { /* fields omitted */ }
A counting or binary semaphore
Methods
impl Semaphore
[src]
fn new_binary() -> Result<Semaphore, FreeRtosError>
[src]
Create a new binary semaphore
fn new_counting(max: u32, initial: u32) -> Result<Semaphore, FreeRtosError>
[src]
Create a new counting semaphore
fn lock<D: DurationTicks>(
&self,
max_wait: D
) -> Result<SemaphoreGuard, FreeRtosError>
[src]
&self,
max_wait: D
) -> Result<SemaphoreGuard, FreeRtosError>
Lock this semaphore in a RAII fashion