Function libftd2xx::vid_pid

source ·
pub fn vid_pid() -> Result<(u32, u32), FtStatus>
Available on Unix only.
Expand description

A command to retrieve the current VID and PID combination from within the internal device list table.

This function is available on Linux or mac only.

This vid and pid are set by set_vid_pid.

Note this returns a tuple of (u32, u32), these should be u16 but the underlying type in the FTD2XX driver is a u32, and the choice to convert is left up to the user.

§Example

use libftd2xx::vid_pid;

let (vid, pid) = vid_pid()?;
println!("VID: 0x{:04X}", vid);
println!("PID: 0x{:04X}", vid);