Files
One-KVM/src/otg/mod.rs
2026-07-26 11:59:58 +08:00

46 lines
877 B
Rust

//! USB OTG composite gadget (HID + MSD + Ethernet).
#[cfg(unix)]
pub mod bridge;
#[cfg(unix)]
pub mod configfs;
#[cfg(unix)]
pub mod function;
#[cfg(unix)]
pub mod hid;
#[cfg(unix)]
pub mod manager;
#[cfg(unix)]
pub mod msd;
#[cfg(unix)]
pub mod network;
pub mod report_desc;
pub mod self_check;
#[cfg(unix)]
pub mod service;
#[cfg(unix)]
pub mod uac;
#[cfg(unix)]
pub use manager::{wait_for_hid_devices, OtgGadgetManager};
#[cfg(unix)]
pub use msd::{MsdFunction, MsdLunConfig};
#[cfg(unix)]
pub use network::NetworkFunction;
#[cfg(unix)]
pub use service::{HidDevicePaths, OtgNetworkStatus, OtgRuntimeHealth, OtgService};
#[cfg(unix)]
pub use uac::UacFunction;
/// List USB Device Controller names exposed by sysfs.
pub fn list_udc_devices() -> Vec<String> {
#[cfg(unix)]
{
configfs::list_udcs()
}
#[cfg(not(unix))]
{
Vec::new()
}
}