tmp108 0.5.0

Platform-agnostic Rust driver for the TMP108 temperature sensor.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Compile-only test: Config field types must be reachable from outside the crate.
use tmp108::{Config, ConversionRate, Hysteresis, Mode, Polarity, Thermostat};

#[test]
fn config_with_explicit_fields_compiles() {
    let cfg = Config {
        thermostat_mode: Thermostat::Interrupt,
        alert_polarity: Polarity::ActiveHigh,
        conversion_rate: ConversionRate::_16Hz,
        hysteresis: Hysteresis::_4C,
    };
    // Avoid unused-binding warning; the assertion is on compilation.
    let _ = cfg;
    // Also pin Mode (re-exported even though not a Config field).
    let _ = Mode::Continuous;
}