xref: /aosp_15_r20/external/crosvm/usb_util/src/lib.rs (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1 // Copyright 2019 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 //! USB device access and descriptor manipulation.
6 
7 mod descriptor;
8 #[cfg(any(target_os = "android", target_os = "linux"))]
9 mod device;
10 mod error;
11 mod types;
12 
13 pub use self::descriptor::parse_usbfs_descriptors;
14 pub use self::descriptor::ConfigDescriptorTree;
15 pub use self::descriptor::DeviceDescriptorTree;
16 pub use self::descriptor::InterfaceDescriptorTree;
17 #[cfg(any(target_os = "android", target_os = "linux"))]
18 pub use self::device::Device;
19 #[cfg(any(target_os = "android", target_os = "linux"))]
20 pub use self::device::DmaBuffer;
21 #[cfg(any(target_os = "android", target_os = "linux"))]
22 pub use self::device::Transfer;
23 #[cfg(any(target_os = "android", target_os = "linux"))]
24 pub use self::device::TransferBuffer;
25 #[cfg(any(target_os = "android", target_os = "linux"))]
26 pub use self::device::TransferHandle;
27 #[cfg(any(target_os = "android", target_os = "linux"))]
28 pub use self::device::TransferStatus;
29 pub use self::error::Error;
30 pub use self::error::Result;
31 pub use self::types::control_request_type;
32 pub use self::types::ConfigDescriptor;
33 pub use self::types::ControlRequestDataPhaseTransferDirection;
34 pub use self::types::ControlRequestRecipient;
35 pub use self::types::ControlRequestType;
36 pub use self::types::DescriptorHeader;
37 pub use self::types::DescriptorType;
38 pub use self::types::DeviceDescriptor;
39 pub use self::types::DeviceSpeed;
40 pub use self::types::EndpointDescriptor;
41 pub use self::types::EndpointDirection;
42 pub use self::types::EndpointType;
43 pub use self::types::InterfaceDescriptor;
44 pub use self::types::StandardControlRequest;
45 pub use self::types::UsbRequestSetup;
46 pub use self::types::ENDPOINT_DIRECTION_OFFSET;
47