[−][src]Struct iaq_core::IaqCore
iAQ-Core device driver
Methods
impl<E, I2C> IaqCore<I2C> where
I2C: Read<Error = E>,
[src]
I2C: Read<Error = E>,
pub fn new(i2c: I2C) -> Self
[src]
Create new instance of the iAQ-Core device.
pub fn destroy(self) -> I2C
[src]
Destroy driver instance, return I²C bus instance.
pub fn data(&mut self) -> Result<Measurement, Error<E>>
[src]
Get all data from the sensor measurement
Returns nb::Error::WouldBlock
in case the device reports a busy or warm up status.
pub fn co2(&mut self) -> Result<u16, Error<E>>
[src]
Get the CO2 (ppm) equivalent prediction value
Returns nb::Error::WouldBlock
in case the device reports a busy or warm up status.
pub fn tvoc(&mut self) -> Result<u16, Error<E>>
[src]
Get the TVOC (ppb) equivalent prediction value
Returns nb::Error::WouldBlock
in case the device reports a busy or warm up status.
pub fn resistance(&mut self) -> Result<u32, Error<E>>
[src]
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> RefUnwindSafe for IaqCore<I2C> where
I2C: RefUnwindSafe,
I2C: RefUnwindSafe,
impl<I2C> Send for IaqCore<I2C> where
I2C: Send,
I2C: Send,
impl<I2C> Sync for IaqCore<I2C> where
I2C: Sync,
I2C: Sync,
impl<I2C> Unpin for IaqCore<I2C> where
I2C: Unpin,
I2C: Unpin,
impl<I2C> UnwindSafe for IaqCore<I2C> where
I2C: UnwindSafe,
I2C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,