Struct lm75::Lm75 [−][src]
pub struct Lm75<I2C> { /* fields omitted */ }
LM75 device driver.
Methods
impl<I2C, E> Lm75<I2C> where
I2C: Write<Error = E>,
[src]
impl<I2C, E> Lm75<I2C> where
I2C: Write<Error = E>,
pub fn new(i2c: I2C, address: SlaveAddr) -> Self
[src]
pub fn new(i2c: I2C, address: SlaveAddr) -> Self
Create new instance of the LM75 device.
pub fn destroy(self) -> I2C
[src]
pub fn destroy(self) -> I2C
Destroy driver instance, return I²C bus instance.
pub fn enable(&mut self) -> Result<(), Error<E>>
[src]
pub fn enable(&mut self) -> Result<(), Error<E>>
Enable the sensor.
pub fn disable(&mut self) -> Result<(), Error<E>>
[src]
pub fn disable(&mut self) -> Result<(), Error<E>>
Disable the sensor (shutdown).
impl<I2C, E> Lm75<I2C> where
I2C: WriteRead<Error = E>,
[src]
impl<I2C, E> Lm75<I2C> where
I2C: WriteRead<Error = E>,
pub fn read_temperature(&mut self) -> Result<f32, Error<E>>
[src]
pub fn read_temperature(&mut self) -> Result<f32, Error<E>>
Read the temperature from the sensor.
Trait Implementations
impl<I2C: Debug> Debug for Lm75<I2C>
[src]
impl<I2C: Debug> Debug for Lm75<I2C>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I2C: Default> Default for Lm75<I2C>
[src]
impl<I2C: Default> Default for Lm75<I2C>