Skip to main content

get_interface_path

Function get_interface_path 

Source
pub fn get_interface_path(
    bus: u8,
    ports: &[u8],
    config: u8,
    interface: u8,
) -> String
Expand description

Build replica of sysfs path with interface

use cyme::usb::get_interface_path;

assert_eq!(get_interface_path(1, &[1, 3], 1, 0), String::from("1-1.3:1.0"));
// bus
assert_eq!(get_interface_path(1, &[], 1, 0), String::from("1-0:1.0"));