pipesio.c File Reference

Input and output functions (reads and writes) on endpoint pipes. More...

#include <usb/usb.h>
#include <usb/dev/pipes.h>
#include <errno.h>
#include <assert.h>
#include <usbhc_iface.h>
#include <usb/dev/request.h>
#include "pipepriv.h"

Go to the source code of this file.

Functions

static void clear_self_endpoint_halt (usb_pipe_t *pipe)
 Try to clear endpoint halt of default control pipe.
int usb_pipe_control_read (usb_pipe_t *pipe, void *setup_buffer, size_t setup_buffer_size, void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size)
 Request a control read transfer on an endpoint pipe.
static int usb_pipe_control_read_no_check (usb_pipe_t *pipe, void *setup_buffer, size_t setup_buffer_size, void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size)
 Request a control read transfer, no checking of input parameters.
int usb_pipe_control_write (usb_pipe_t *pipe, void *setup_buffer, size_t setup_buffer_size, void *data_buffer, size_t data_buffer_size)
 Request a control write transfer on an endpoint pipe.
static int usb_pipe_control_write_no_check (usb_pipe_t *pipe, void *setup_buffer, size_t setup_buffer_size, void *data_buffer, size_t data_buffer_size)
 Request a control write transfer, no checking of input parameters.
int usb_pipe_read (usb_pipe_t *pipe, void *buffer, size_t size, size_t *size_transfered)
 Request a read (in) transfer on an endpoint pipe.
static int usb_pipe_read_no_checks (usb_pipe_t *pipe, void *buffer, size_t size, size_t *size_transfered)
 Request an in transfer, no checking of input parameters.
int usb_pipe_write (usb_pipe_t *pipe, void *buffer, size_t size)
 Request a write (out) transfer on an endpoint pipe.
static int usb_pipe_write_no_check (usb_pipe_t *pipe, void *buffer, size_t size)
 Request an out transfer, no checking of input parameters.


Detailed Description

Input and output functions (reads and writes) on endpoint pipes.

Note on synchronousness of the operations: there is ABSOLUTELY NO guarantee that a call to particular function will not trigger a fibril switch.

Note about the implementation: the transfer requests are always divided into two functions. The outer one does checking of input parameters (e.g. that session was already started, buffers are not NULL etc), while the inner one (with _no_checks suffix) does the actual IPC (it checks for IPC errors, obviously).

Definition in file pipesio.c.


Generated on Thu Jun 2 07:45:54 2011 for HelenOS/USB by  doxygen 1.4.7