Crate usb_util

Source
Expand description

USB device access and descriptor manipulation.

Modules§

descriptor 🔒
device 🔒
error 🔒
types 🔒

Structs§

ConfigDescriptor
Standard USB configuration descriptor as defined in USB 2.0 chapter 9, not including the standard header.
ConfigDescriptorTree
DescriptorHeader
Standard USB descriptor header common to all descriptor types.
Device
Device represents a USB device.
DeviceDescriptor
Standard USB device descriptor as defined in USB 2.0 chapter 9, not including the standard header.
DeviceDescriptorTree
DmaBuffer
DmaBuffer represents a DMA buffer lent by a device
EndpointDescriptor
Standard USB endpoint descriptor as defined in USB 2.0 chapter 9, not including the standard header.
InterfaceDescriptor
Standard USB interface descriptor as defined in USB 2.0 chapter 9, not including the standard header.
InterfaceDescriptorTree
Transfer
Transfer contains the information necessary to submit a USB request and, once it has been submitted and completed, contains the response.
TransferHandle
TransferHandle is a handle that allows cancellation of in-flight transfers between submit_transfer() and get_completed_transfer(). Attempting to cancel a transfer that has already completed is safe and will return an error.
UsbRequestSetup
RequestSetup is first part of control transfer buffer.

Enums§

ControlRequestDataPhaseTransferDirection
ControlRequestRecipient
Recipient type of control request.
ControlRequestType
Request types.
DescriptorType
Standard USB descriptor types.
DeviceSpeed
USB device speed
EndpointDirection
Endpoint Directions.
EndpointType
Endpoint types.
Error
StandardControlRequest
Standard request defined in usb spec.
TransferBuffer
TransferBuffer is used for data transfer between crosvm and the host kernel
TransferStatus

Constants§

ENDPOINT_DIRECTION_OFFSET
Endpoint direction offset.

Functions§

control_request_type
Construct a bmRequestType value for a control request.
parse_usbfs_descriptors
Given data containing a full set of descriptors as provided by the Linux kernel usbdevfs descriptors file, parse the descriptors into a tree data structure.

Type Aliases§

Result