pipesinit.c File Reference

Initialization of endpoint pipes. More...

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

Go to the source code of this file.

Defines

#define CTRL_PIPE_MIN_PACKET_SIZE   8
#define DEV_DESCR_MAX_PACKET_SIZE_OFFSET   7
#define LAST_NESTING   { -1, -1 }
#define NESTING(parentname, childname)

Functions

static bool endpoint_fits_description (const usb_endpoint_description_t *wanted, usb_endpoint_description_t *found)
 Tells whether found endpoint corresponds to endpoint described by user.
static usb_endpoint_mapping_tfind_endpoint_mapping (usb_endpoint_mapping_t *mapping, size_t mapping_count, usb_endpoint_description_t *found_endpoint, int interface_number, int interface_setting)
 Find endpoint mapping for a found endpoint.
static bool is_endpoint_descriptor (uint8_t *descriptor)
 Tells whether given descriptor is of endpoint type.
static int process_endpoint (usb_endpoint_mapping_t *mapping, size_t mapping_count, usb_standard_interface_descriptor_t *interface, usb_standard_endpoint_descriptor_t *endpoint, usb_device_connection_t *wire)
 Process endpoint descriptor.
static int process_interface (usb_endpoint_mapping_t *mapping, size_t mapping_count, usb_dp_parser_t *parser, usb_dp_parser_data_t *parser_data, uint8_t *interface_descriptor)
 Process whole USB interface.
int usb_pipe_initialize (usb_pipe_t *pipe, usb_device_connection_t *connection, usb_endpoint_t endpoint_no, usb_transfer_type_t transfer_type, size_t max_packet_size, usb_direction_t direction)
 Initialize USB endpoint pipe.
int usb_pipe_initialize_default_control (usb_pipe_t *pipe, usb_device_connection_t *connection)
 Initialize USB endpoint pipe as the default zero control pipe.
int usb_pipe_initialize_from_configuration (usb_endpoint_mapping_t *mapping, size_t mapping_count, uint8_t *configuration_descriptor, size_t configuration_descriptor_size, usb_device_connection_t *connection)
 Initialize endpoint pipes from configuration descriptor.
int usb_pipe_probe_default_control (usb_pipe_t *pipe)
 Probe default control pipe for max packet size.
int usb_pipe_register (usb_pipe_t *pipe, unsigned int interval, usb_hc_connection_t *hc_connection)
 Register endpoint with the host controller.
int usb_pipe_register_with_speed (usb_pipe_t *pipe, usb_speed_t speed, unsigned int interval, usb_hc_connection_t *hc_connection)
 Register endpoint with a speed at the host controller.
int usb_pipe_unregister (usb_pipe_t *pipe, usb_hc_connection_t *hc_connection)
 Revert endpoint registration with the host controller.

Variables

static usb_dp_descriptor_nesting_t descriptor_nesting []
 Nesting pairs of standard descriptors.


Detailed Description

Initialization of endpoint pipes.

Definition in file pipesinit.c.


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