pub unsafe extern "C" fn k_pipe_get(
pipe: *mut k_pipe,
data: *mut c_void,
bytes_to_read: usize,
bytes_read: *mut usize,
min_xfer: usize,
timeout: k_timeout_t,
) -> i32
Expand description
@brief Read data from a pipe.
This routine reads up to @a bytes_to_read bytes of data from @a pipe.
@param pipe Address of the pipe. @param data Address to place the data read from pipe. @param bytes_to_read Maximum number of data bytes to read. @param bytes_read Address of area to hold the number of bytes read. @param min_xfer Minimum number of data bytes to read. @param timeout Waiting period to wait for the data to be read, or one of the special values K_NO_WAIT and K_FOREVER.
@retval 0 At least @a min_xfer bytes of data were read. @retval -EINVAL invalid parameters supplied @retval -EIO Returned without waiting; zero data bytes were read. @retval -EAGAIN Waiting period timed out; between zero and @a min_xfer minus one data bytes were read.