pub struct Lm75<I2C, IC> { /* private fields */ }
Expand description
LM75 device driver.
Implementations§
source§impl<I2C, IC, E> Lm75<I2C, IC>where
I2C: I2c<Error = E>,
IC: ResolutionSupport<E>,
impl<I2C, IC, E> Lm75<I2C, IC>where
I2C: I2c<Error = E>,
IC: ResolutionSupport<E>,
sourcepub fn set_fault_queue(&mut self, fq: FaultQueue) -> Result<(), Error<E>>
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.
sourcepub fn set_os_polarity(&mut self, polarity: OsPolarity) -> Result<(), Error<E>>
pub fn set_os_polarity(&mut self, polarity: OsPolarity) -> Result<(), Error<E>>
Set the OS polarity.
sourcepub fn set_os_temperature(&mut self, temperature: f32) -> Result<(), Error<E>>
pub fn set_os_temperature(&mut self, temperature: f32) -> Result<(), Error<E>>
Set the OS temperature (celsius).
sourcepub fn set_hysteresis_temperature(
&mut self,
temperature: f32
) -> Result<(), Error<E>>
pub fn set_hysteresis_temperature( &mut self, temperature: f32 ) -> Result<(), Error<E>>
Set the hysteresis temperature (celsius).
sourcepub fn read_temperature(&mut self) -> Result<f32, Error<E>>
pub fn read_temperature(&mut self) -> Result<f32, Error<E>>
Read the temperature from the sensor (celsius).
source§impl<I2C, E> Lm75<I2C, Pct2075>where
I2C: I2c<Error = E>,
impl<I2C, E> Lm75<I2C, Pct2075>where
I2C: I2c<Error = E>,
sourcepub fn new_pct2075<A: Into<Address>>(i2c: I2C, address: A) -> Self
pub fn new_pct2075<A: Into<Address>>(i2c: I2C, address: A) -> Self
Create new instance of the PCT2075 device.
sourcepub fn set_sample_rate(&mut self, period: u16) -> Result<(), Error<E>>
pub fn set_sample_rate(&mut self, period: u16) -> Result<(), Error<E>>
Set the sensor sample rate period in milliseconds (100ms increments).
For values outside of the range [100 - 3100]
or those not a multiple of 100,
`Error::InvalidInputData will be returned
sourcepub fn read_sample_rate(&mut self) -> Result<u16, Error<E>>
pub fn read_sample_rate(&mut self) -> Result<u16, Error<E>>
Read the sample rate period from the sensor (ms).
Trait Implementations§
Auto Trait Implementations§
impl<I2C, IC> RefUnwindSafe for Lm75<I2C, IC>where
I2C: RefUnwindSafe,
IC: RefUnwindSafe,
impl<I2C, IC> Send for Lm75<I2C, IC>
impl<I2C, IC> Sync for Lm75<I2C, IC>
impl<I2C, IC> Unpin for Lm75<I2C, IC>
impl<I2C, IC> UnwindSafe for Lm75<I2C, IC>where
I2C: UnwindSafe,
IC: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more