rust-usbtmc

Crates.iorust-usbtmc
lib.rsrust-usbtmc
version0.1.2
sourcesrc
created_at2021-04-30 16:38:28.487945
updated_at2021-04-30 16:43:08.880087
descriptionUSBTMC driver for controlling instruments over USB.
homepagehttps://github.com/rogerioadris/rust-usbtmc
repositoryhttps://github.com/rogerioadris/rust-usbtmc
max_upload_size
id391612
size14,432
Rogério Adriano (rogerioadris)

documentation

https://github.com/rogerioadris/rust-usbtmc

README

Rust USBTMC

Exemplo de uso

use rust_usbtmc::instrument::Instrument;

const VID: u16 = 0x0699; // Vendor
const PID: u16 = 0x0368; // Product

fn main() {
    let mut instr = Instrument::new(VID, PID);

    // Command Osciloscope
    instr.write("SELECT:CH1 1").unwrap();
    println!("Ask: {}", instr.ask("*IDN?").unwrap());
}
Commit count: 14

cargo fmt