Expand description
USB device access and descriptor manipulation.
Modules§
- descriptor 🔒
- device 🔒
- error 🔒
- types 🔒
Structs§
- Config
Descriptor - Standard USB configuration descriptor as defined in USB 2.0 chapter 9, not including the standard header.
- Config
Descriptor Tree - Descriptor
Header - Standard USB descriptor header common to all descriptor types.
- Device
- Device represents a USB device.
- Device
Descriptor - Standard USB device descriptor as defined in USB 2.0 chapter 9, not including the standard header.
- Device
Descriptor Tree - DmaBuffer
- DmaBuffer represents a DMA buffer lent by a device
- Endpoint
Descriptor - Standard USB endpoint descriptor as defined in USB 2.0 chapter 9, not including the standard header.
- Interface
Descriptor - Standard USB interface descriptor as defined in USB 2.0 chapter 9, not including the standard header.
- Interface
Descriptor Tree - Transfer
- Transfer contains the information necessary to submit a USB request and, once it has been submitted and completed, contains the response.
- Transfer
Handle - 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.
- UsbRequest
Setup - RequestSetup is first part of control transfer buffer.
Enums§
- Control
Request Data Phase Transfer Direction - Control
Request Recipient - Recipient type of control request.
- Control
Request Type - Request types.
- Descriptor
Type - Standard USB descriptor types.
- Device
Speed - USB device speed
- Endpoint
Direction - Endpoint Directions.
- Endpoint
Type - Endpoint types.
- Error
- Standard
Control Request - Standard request defined in usb spec.
- Transfer
Buffer - TransferBuffer is used for data transfer between crosvm and the host kernel
- Transfer
Status
Constants§
- ENDPOINT_
DIRECTION_ OFFSET - Endpoint direction offset.
Functions§
- control_
request_ type - Construct a bmRequestType value for a control request.
- parse_
usbfs_ descriptors - Given
datacontaining a full set of descriptors as provided by the Linux kernel usbdevfsdescriptorsfile, parse the descriptors into a tree data structure.