libnspire 0.2.3

high-level bindings to libnspire for USB interaction with TI Nspire calculators
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::convert::TryFrom;
use std::fs::File;
use std::io::Read;

fn main() {
    let dev = rusb::open_device_with_vid_pid(0x0451, 0xe012).unwrap();
    let handle = libnspire::Handle::new(dev).unwrap();
    let mut buf = vec![];
    File::open(std::env::current_exe().unwrap())
        .unwrap()
        .read_to_end(&mut buf)
        .unwrap();
    handle.write_file("test.tns", &buf, &mut |prog| println!("{}", prog));
}