riot_sys::bindgen

Function ztimer_msg_receive_timeout

Source
pub unsafe extern "C" fn ztimer_msg_receive_timeout(
    clock: *mut ztimer_clock_t,
    msg: *mut msg_t,
    timeout: u32,
) -> c_int
Expand description

@brief receive a message (blocking, with timeout)

Similar to msg_receive(), but with a timeout parameter. The function will return after waiting at most @p timeout ticks.

@note: This might function might leave a message with type MSG_ZTIMER in the thread’s message queue, which must be handled (ignored).

@param[in] clock ztimer clock to operate on @param[out] msg pointer to buffer which will be filled if a message is received @param[in] timeout relative timeout, in @p clock time units

@return >=0 if a message was received @return -ETIME on timeout