[][src]Struct aht20::Aht20

pub struct Aht20<I2C, D> { /* fields omitted */ }

AHT20 driver.

Implementations

impl<I2C, D, E> Aht20<I2C, D> where
    I2C: WriteRead<Error = E> + Write<Error = E>,
    D: DelayMs<u16>, 
[src]

pub fn new(i2c: I2C, delay: D) -> Result<Self, Error<E>>[src]

Creates a new AHT20 device from an I2C peripheral and a Delay.

pub fn calibrate(&mut self) -> Result<(), Error<E>>[src]

Self-calibrate the sensor.

pub fn reset(&mut self) -> Result<(), E>[src]

Soft resets the sensor.

pub fn read(&mut self) -> Result<(Humidity, Temperature), Error<E>>[src]

Reads humidity and temperature.

Auto Trait Implementations

impl<I2C, D> RefUnwindSafe for Aht20<I2C, D> where
    D: RefUnwindSafe,
    I2C: RefUnwindSafe

impl<I2C, D> Send for Aht20<I2C, D> where
    D: Send,
    I2C: Send

impl<I2C, D> Sync for Aht20<I2C, D> where
    D: Sync,
    I2C: Sync

impl<I2C, D> Unpin for Aht20<I2C, D> where
    D: Unpin,
    I2C: Unpin

impl<I2C, D> UnwindSafe for Aht20<I2C, D> where
    D: UnwindSafe,
    I2C: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.