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).
pub fn set_fault_queue(&mut self, fq: FaultQueue) -> Result<(), Error<E>>
[src]
pub fn set_fault_queue(&mut self, fq: FaultQueue) -> Result<(), Error<E>>
Set the fault queue.
Set the number of consecutive faults that will trigger an OS condition.
pub fn set_os_polarity(&mut self, polarity: OsPolarity) -> Result<(), Error<E>>
[src]
pub fn set_os_polarity(&mut self, polarity: OsPolarity) -> Result<(), Error<E>>
Set the OS polarity.
pub fn set_os_mode(&mut self, mode: OsMode) -> Result<(), Error<E>>
[src]
pub fn set_os_mode(&mut self, mode: OsMode) -> Result<(), Error<E>>
Set the OS operation mode.
pub fn set_os_temperature(&mut self, temperature: f32) -> Result<(), Error<E>>
[src]
pub fn set_os_temperature(&mut self, temperature: f32) -> Result<(), Error<E>>
Set the OS temperature.
pub fn set_hysteresis_temperature(
&mut self,
temperature: f32
) -> Result<(), Error<E>>
[src]
pub fn set_hysteresis_temperature(
&mut self,
temperature: f32
) -> Result<(), Error<E>>
Set the hysteresis temperature.
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>