/// Wait for an item to be available on the queue.
Wait for an item to be available on the queue.
Wait for an item to be available on the queue .
pub fn receive<D: DurationTicks>(&self, max_wait: D) -> Result<T, FreeRtosError> {
        unsafe {
            let mut buff = mem::zeroed::<T>();
            let r = freertos_rs_queue_receive(
                self.queue,
                &mut buff as *mut _ as FreeRtosMutVoidPtr,
                max_wait.to_ticks(),
            );
            if r == 0 {
                return Ok(buff);
            } else {
                return Err(FreeRtosError::QueueReceiveTimeout);
            }
        }
    }
pub fn receive < D : DurationTicks > ( & self , max_wait : D ) -> Result < T , FreeRtosError > { unsafe { let mut buff = mem :: zeroed :: < T > ( ) ; let r = freertos_rs_queue_receive ( self . queue , & mut buff as * mut _ as FreeRtosMutVoidPtr , max_wait . to_ticks ( ) , ) ; if r == 0 { return Ok ( buff ) ; } else { return Err ( FreeRtosError :: QueueReceiveTimeout ) ; } } }
Wait for an item to be available on the queue.
Wait for an item to be available on the queue .
&self
max_wait
D