This topic has not yet been rated - Rate this topic

USB I/O Transfers

The topics in this section provides an USB pipes, URBs for I/O requests, and describes how a client driver can use the device driver interfaces (DDIs) to transfer data to and from a USB device.

A transfer takes place every time data is moved between the host controller and the USB device. In general, USB transfers can be broadly categorized into control transfers and data transfers. All USB devices must support control transfers and can support endpoints for data transfers. Each type of transfer is associated with the type of USB endpoint (a buffer in the device). Control transfer is associated with the default endpoint and data transfers use unidirectional endpoints. The data transfer types use interrupt, bulk, and isochronous endpoints. The USB driver stack creates a communication channel called a pipe for each endpoint supported by the device. One end of the pipe is the device's endpoint. The other end of the pipe is always the host controller.

Before sending I/O requests to the device, the client driver must retrieve information about configurations, interfaces, endpoints, the vendor, and class-specific descriptors from a USB device. Typically, the client driver gets that information by sending get-descriptor request. For more information about submitting a get-descriptor request (URB of the type URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE), see URB_CONTROL_DESCRIPTOR_REQUEST.

After a get-descriptor request is complete, the client driver must select a configuration in the device. Within that select-configuration request, the client driver specifies which configuration and interfaces to select as well as which alternate settings to activate. Each alternate setting can specify one or more USB endpoints that are available for data transfers. For information about building a select-configuration request, see How to Select a Configuration for a USB Device.

After a select-configuration request is complete, the client driver has access to the pipe handles created by the USB driver stack for each endpoint in the currently selected alternate setting. To transfer data to an endpoint, a client driver creates a request by formatting an URB specific to the type of request. The URB contains information about the request such as the target pipe handle, transfer buffer and its length. The client driver then submits the URB to the USB driver stack. The USB driver stack processes the request and sends the specified data to the requested target pipe.

In this section

TopicDescription

USB Control Transfer

All USB devices support endpoint zero for standard control requests. This topic describes the standard requests that a client driver can send in a control transfer.

USB Pipes

This topic provides an overview of USB pipes and describes pipe operations.

USB Bulk and Interrupt Transfer

This topic provides a brief overview about bulk and interrupt transfers.

How to Open and Close Static Streams in a USB Bulk Endpoint

This topic discusses static streams capability and explains how a USB client driver can open and close streams in a bulk endpoint of a USB 3.0 device.

How to Transfer Data to USB Isochronous Endpoints

This topic describes how a client driver can build a USB Request Block (URB) to transfer data to and from supported isochronous endpoints in a USB device.

How to Send Chained MDLs

In this topic, you will learn about the chained MDLs capability in the USB driver stack, and how a client driver can send a transfer buffer as a chain of MDL structure.

USB Bandwidth Allocation

This section provides guidance concerning the careful management of USB bandwidth.

 

Related topics

USB Driver Development Guide

 

 

Send comments about this topic to Microsoft

Build date: 4/5/2012

Did you find this helpful?
(1500 characters remaining)