pub struct TemperatureSensor<'d> { /* private fields */ }Expand description
Temperature sensor driver
Implementations§
Source§impl<'d> TemperatureSensor<'d>
impl<'d> TemperatureSensor<'d>
Sourcepub fn new(peripheral: TSENS<'d>, config: Config) -> Result<Self, ConfigError>
pub fn new(peripheral: TSENS<'d>, config: Config) -> Result<Self, ConfigError>
Creates and powers up the temperature sensor with the given configuration.
Sourcepub fn apply_config(&mut self, config: &Config) -> Result<(), ConfigError>
pub fn apply_config(&mut self, config: &Config) -> Result<(), ConfigError>
Changes the temperature sensor configuration.
Sourcepub fn get_temperature(&mut self) -> Temperature
pub fn get_temperature(&mut self) -> Temperature
Reads a temperature sample.
Waits for any remaining stabilization time after power-up or a range change.
Trait Implementations§
Source§impl<'d> Debug for TemperatureSensor<'d>
Available on crate feature unstable only.
impl<'d> Debug for TemperatureSensor<'d>
Available on crate feature
unstable only.Source§impl Drop for TemperatureSensor<'_>
Available on crate feature unstable only.
impl Drop for TemperatureSensor<'_>
Available on crate feature
unstable only.