A Rust wrapper for the switchtec-user
library.
Details and usage instructions for the switchtec-user
library can be found here.
```rust use std::env;
use switchtecusersys::{switchtecdietemp, SwitchtecDevice};
fn main() -> anyhow::Result<()> { let path = env::args() .skip(1) .next() .unwraporelse(|| "/dev/pciswitch0".to_owned());
let dev = SwitchtecDevice::new(path).open()?;
unsafe {
let temp = switchtec_die_temp(*dev);
println!("Temperature: {}", temp);
}
Ok(())
} ```
switchtec-user-sys
is both MIT and Apache License, Version 2.0 licensed, as found
in the LICENSE-MIT and LICENSE-APACHE files.