Silicon Labs USB Xpress driver
| OS | Status |
|---|---|
| Linux | |
| Windows (MSVC) |
This library port API from SiUSBXp, which is an open source port to SiUSBXp.dll, supplied with SiLabs USBXpress. The underlying USB backend is libusb, which enable the cross platform compilation.
Usage
Add to your Cargo.toml:
[]
= "0.2"
You must have pkg-config and cc available.
Example
ProductStringType, timeouts, set_timeouts};
// get device count
let num = devices_count;
// print serial number for all devices
let if_sn = product_string;
// print VID for selected devices
let pst = VID;
let if_vid = product_string;
// get timeouts
let t = timeouts.unwrap;
// set timeouts
set_timeouts.unwrap;
// open handle
let mut handle = open.unwrap;
// write to device handle
let v = vec!;
handle.write;
// read 7 bytes from device handle
let read_res = handle.read;
// close device
handle.close;