[−][src]Struct aht20::Aht20
AHT20 driver.
Implementations
impl<I2C, D, E> Aht20<I2C, D> where
I2C: WriteRead<Error = E> + Write<Error = E>,
D: DelayMs<u16>,
[src]
I2C: WriteRead<Error = E> + Write<Error = E>,
D: DelayMs<u16>,
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,
D: RefUnwindSafe,
I2C: RefUnwindSafe,
impl<I2C, D> Send for Aht20<I2C, D> where
D: Send,
I2C: Send,
D: Send,
I2C: Send,
impl<I2C, D> Sync for Aht20<I2C, D> where
D: Sync,
I2C: Sync,
D: Sync,
I2C: Sync,
impl<I2C, D> Unpin for Aht20<I2C, D> where
D: Unpin,
I2C: Unpin,
D: Unpin,
I2C: Unpin,
impl<I2C, D> UnwindSafe for Aht20<I2C, D> where
D: UnwindSafe,
I2C: UnwindSafe,
D: 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>,