unsafe forbidden License

libmedium

A safe rust library to communicate with the sysfs interface of lm-sensors.

Usage

Just add this to your Cargo.toml file:

toml [dependencies] libmedium = "0.7"

Cargo-Features

Standard features

Non standard features

Examples

```rust use libmedium::{ parse_hwmons, sensors::{temp::TempSensor, Sensor}, };

let hwmons = parsehwmons().unwrap(); for hwmon in &hwmons { println!("hwmon{} with name {}:", hwmon.index(), hwmon.name()); for (, tempsensor) in hwmon.temps() { let temperature = tempsensor.readinput().unwrap(); println!("\t{}: {}", tempsensor.name(), temperature); } } ```

```rust use libmedium::{ parse_hwmons, sensors::pwm::WriteablePwmSensor, units::{Pwm, PwmEnable}, };

let hwmons = parsehwmons().unwrap(); for hwmon in &hwmons { for (, pwm) in hwmon.writeablepwms() { pwm.writeenable(PwmEnable::ManualControl).unwrap(); pwm.write_pwm(Pwm::FULLSPEED).unwrap(); } } ```

License

This project is licensed under the MIT License - see the LICENSE file for details