Concepts for all USB developers
A Universal Serial Bus (USB) device defines its capabilities and features through configurations, interfaces, alternate settings, and endpoints. This topic provides a high-level overview of those concepts. For details, see the USB specifications at Universal Serial Bus Documents.
In this section
| Topic | Description |
|---|---|
|
A USB device defines its capabilities and features through configurations, interfaces, alternate settings, and endpoints. This topic provides a high-level overview of those concepts. | |
|
A USB device provides information about itself in data structures called USB descriptors. This section provides information about device, configuration, interface, and endpoint descriptors and ways to retrieve them from a USB device. | |
|
A USB device has endpoints that are used to for data transfers. On the host side, endpoints are represented by pipes. This topic differentiates between those two terms. | |
|
This topic presents frequently asked questions for driver developers who are new to developing and integrating USB devices and drivers with Windows operating systems. |
Common USB scenarios
1—Get the device handle for communication and use the retrieved handle or object to send data transfers.
| Client driver | Windows Store app | Windows desktop app |
|---|---|---|
|
KMDF: WdfUsbTargetDeviceCreateWithParameters UMDF: IWDFUsbTargetDevice |
See Write a Windows desktop app based on the WinUSB template. |
USB descriptor retrieval to get information about the device's configuration(s), interface(s), setting(s), and their endpoint(s).
| Client driver | Windows Store app | Windows desktop app |
|---|---|---|
|
KMDF: WdfUsbTargetDeviceGetDeviceDescriptor WdfUsbTargetDeviceRetrieveConfigDescriptor UMDF: IWDFUsbTargetDevice::RetrieveDescriptor See USB descriptors. |
2—Configure the device to select an active USB configuration and setting per interface.
| Client driver | Windows Store app | Windows desktop app |
|---|---|---|
|
KMDF: WdfUsbTargetDeviceSelectConfig USBD_SelectConfigUrbAllocateAndBuild See How to select a configuration for a USB device. See How to select an alternate setting in a USB interface. UMDF: Configuration selection is not Supported. | WinUsb_SetCurrentAlternateSetting |
3—Send control transfers for configuring the device and performing vendor commands that are specific to particular device.
| Client driver | Windows Store app | Windows desktop app |
|---|---|---|
|
KMDF: WdfUsbTargetDeviceSendControlTransferSynchronously WdfUsbTargetDeviceFormatRequestForControlTransfer USBD_SelectConfigUrbAllocateAndBuild UMDF: |
4—Send bulk transfers, typically used by mass storage devices that transfer large amount of data.
5—Send interrupt transfers. Data is read to retrieve hardware interrupt data.
| Client driver | Windows Store app | Windows desktop app |
|---|---|---|
|
Same as bulk transfers. |
UsbInterruptInPipe.DataReceived UsbInterruptOutPipe.OutputStream How to send a USB interrupt transfer request (Windows Store app). |
Same as bulk transfers. |
6—Send isochronous transfers, mostly used for media streaming devices.
| Client driver | Windows Store app | Windows desktop app |
|---|---|---|
|
KMDF: WdfUsbTargetDeviceCreateIsochUrb See How to transfer data to USB isochronous endpoints. UMDF: Not supported. |
Not supported. |
See Sending USB isochronous transfers from a WinUSB desktop app. |
7—USB selective suspend to allow the device to enter a low power state and bring the device back to working state.
| Client driver | Windows Store app | Windows desktop app |
|---|---|---|
|
KMDF: WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS UMDF: IWDFUsbTargetDevice::SetPowerPolicy IWDFDevice2::AssignS0IdleSettings |
Not supported. |
Related topics