[][src]Struct hdc20xx::Hdc20xx

pub struct Hdc20xx<I2C, MODE> { /* fields omitted */ }

HDC2080, HDC2021 and HDC2010 device driver

Methods

impl<I2C> Hdc20xx<I2C, OneShot>[src]

pub fn new(i2c: I2C, address: SlaveAddr) -> Self[src]

Create new instance of the device.

impl<I2C, MODE> Hdc20xx<I2C, MODE>[src]

pub fn destroy(self) -> I2C[src]

Destroy driver instance, return I2C bus.

impl<I2C, E, MODE> Hdc20xx<I2C, MODE> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

pub fn set_measurement_mode(
    &mut self,
    mode: MeasurementMode
) -> Result<(), Error<E>>
[src]

Set measurement mode

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

Read data and interrupt status

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

Get device ID

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

Get manufacturer ID

impl<I2C, E> Hdc20xx<I2C, OneShot> where
    I2C: WriteRead<Error = E> + Write<Error = E>, 
[src]

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

Make measurement of temperature or temperature and humidity according to the configuration.

Note that all status except the last one once data becomes available are discarded.

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

Software reset

Trait Implementations

impl<I2C: Debug, MODE: Debug> Debug for Hdc20xx<I2C, MODE>[src]

Auto Trait Implementations

impl<I2C, MODE> RefUnwindSafe for Hdc20xx<I2C, MODE> where
    I2C: RefUnwindSafe,
    MODE: RefUnwindSafe

impl<I2C, MODE> Send for Hdc20xx<I2C, MODE> where
    I2C: Send,
    MODE: Send

impl<I2C, MODE> Sync for Hdc20xx<I2C, MODE> where
    I2C: Sync,
    MODE: Sync

impl<I2C, MODE> Unpin for Hdc20xx<I2C, MODE> where
    I2C: Unpin,
    MODE: Unpin

impl<I2C, MODE> UnwindSafe for Hdc20xx<I2C, MODE> where
    I2C: UnwindSafe,
    MODE: 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.