#[cfg(all(feature = "linux-static-rusb", not(target_os = "macos")))]
extern crate rusb;
extern crate hidapi_rusb;
use hidapi_rusb::HidApi;
fn main() {
let api = HidApi::new().expect("Failed to create API instance");
let joystick = api.open(1103, 45320).expect("Failed to open device");
loop {
let mut buf = [0u8; 256];
let res = joystick.read(&mut buf[..]).unwrap();
let mut data_string = String::new();
for u in &buf[..res] {
data_string.push_str(&(u.to_string() + "\t"));
}
println!("{}", data_string);
}
}