zephyr::raw

Function k_pipe_write

Source
pub unsafe extern "C" fn k_pipe_write(
    pipe: *mut k_pipe,
    data: *const u8,
    len: usize,
    timeout: k_timeout_t,
) -> i32
Expand description

@brief Write data to a pipe

This routine writes up to @a len bytes of data to @a pipe. If the pipe is full, the routine will block until the data can be written or the timeout expires.

@param pipe Address of the pipe. @param data Address of data to write. @param len Size of data (in bytes). @param timeout Waiting period to wait for the data to be written.

@retval number of bytes written on success @retval -EAGAIN if no data could be written before the timeout expired @retval -ECANCELED if the write was interrupted by k_pipe_reset(..) @retval -EPIPE if the pipe was closed