pub struct IaqCore<I2C> { /* private fields */ }
Expand description
iAQ-Core device driver
Implementations§
Source§impl<E, I2C> IaqCore<I2C>where
I2C: Read<Error = E>,
impl<E, I2C> IaqCore<I2C>where
I2C: Read<Error = E>,
Sourcepub fn data(&mut self) -> Result<Measurement, Error<E>>
pub fn data(&mut self) -> Result<Measurement, Error<E>>
Get all data from the sensor measurement
Returns nb::Error::WouldBlock
in case the device reports a busy or warm up status.
Sourcepub fn co2(&mut self) -> Result<u16, Error<E>>
pub fn co2(&mut self) -> Result<u16, Error<E>>
Get the CO2 (ppm) equivalent prediction value
Returns nb::Error::WouldBlock
in case the device reports a busy or warm up status.
Sourcepub fn tvoc(&mut self) -> Result<u16, Error<E>>
pub fn tvoc(&mut self) -> Result<u16, Error<E>>
Get the TVOC (ppb) equivalent prediction value
Returns nb::Error::WouldBlock
in case the device reports a busy or warm up status.
Sourcepub fn resistance(&mut self) -> Result<u32, Error<E>>
pub fn resistance(&mut self) -> Result<u32, Error<E>>
Get the sensor resistance in Ohm
Returns nb::Error::WouldBlock
in case the device reports a busy or warm up status.
Trait Implementations§
Auto Trait Implementations§
impl<I2C> Freeze for IaqCore<I2C>where
I2C: Freeze,
impl<I2C> RefUnwindSafe for IaqCore<I2C>where
I2C: RefUnwindSafe,
impl<I2C> Send for IaqCore<I2C>where
I2C: Send,
impl<I2C> Sync for IaqCore<I2C>where
I2C: Sync,
impl<I2C> Unpin for IaqCore<I2C>where
I2C: Unpin,
impl<I2C> UnwindSafe for IaqCore<I2C>where
I2C: 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