Function libftd2xx::list_devices_fs
source · pub fn list_devices_fs() -> Result<Vec<DeviceInfo>>
Expand description
Lists FTDI devices using the Linux file system.
There is a bug in the vendor driver where the serial_number
and
description
fields may be blank on the FT4232H and FT2232H when only
some of the ports are unbound from the ftdi_sio
linux kernel module.
This will not work if you have a custom VID/PID programmed onto your FTDI device.
§Limitations
port_open
will always befalse
.speed
will currently beNone
.- This will return an empty vector if
/sys/bus/usb/devices
does not exist.
§Example
use libftd2xx::list_devices_fs;
let mut devices = list_devices_fs()?;
while let Some(device) = devices.pop() {
println!("device: {:?}", device);
}