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(unix)] 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(unix)] 18 pub use self::device::Device; 19 #[cfg(unix)] 20 pub use self::device::Transfer; 21 #[cfg(unix)] 22 pub use self::device::TransferStatus; 23 pub use self::error::Error; 24 pub use self::error::Result; 25 pub use self::types::control_request_type; 26 pub use self::types::ConfigDescriptor; 27 pub use self::types::ControlRequestDataPhaseTransferDirection; 28 pub use self::types::ControlRequestRecipient; 29 pub use self::types::ControlRequestType; 30 pub use self::types::DescriptorHeader; 31 pub use self::types::DescriptorType; 32 pub use self::types::DeviceDescriptor; 33 pub use self::types::DeviceSpeed; 34 pub use self::types::EndpointDescriptor; 35 pub use self::types::EndpointDirection; 36 pub use self::types::EndpointType; 37 pub use self::types::InterfaceDescriptor; 38 pub use self::types::StandardControlRequest; 39 pub use self::types::UsbRequestSetup; 40 pub use self::types::ENDPOINT_DIRECTION_OFFSET; 41