[][src]Struct hts221::HTS221

pub struct HTS221<Comm, E> { /* fields omitted */ }

Interface for the chip.

Methods

impl<Comm, E> HTS221<Comm, E> where
    Comm: Write<Error = E> + WriteRead<Error = E>, 
[src]

pub fn tie<'a>(&self, comm: &'a mut Comm) -> Device<'a, Comm>[src]

pub fn humidity_x2(&mut self, comm: &mut Comm) -> Result<u16, E>[src]

Returns the current humidity reading, in relative humidity half-percentage points. To get the relative humidity as a percentage between 0 and 100, divide the result by 2.

pub fn temperature_x8(&mut self, comm: &mut Comm) -> Result<i16, E>[src]

Returns the current temperature reading, in 1/8 degrees Celsius. To get the temperature in degrees Celsius, divide the result by 8.

pub fn convert_humidity_x2(&self, raw: i16) -> u16[src]

Converts a humidity ADC reading into relative humidity half-percentage points using the device's calibration. To get the relative humidity as a percent, divide the result by 2.

The result is clamped such that it is always within the device's operating range.

pub fn convert_temperature_x8(&self, raw: i16) -> i16[src]

Converts a temperature ADC reading into 1/8 degrees Celsius using the device's calibration. To get the temperature in degrees Celsius, divide the result by 8.

The result is clamped such that it is always within the device's operating range.

pub fn who_am_i(&mut self, comm: &mut Comm) -> Result<WhoAmI, E>[src]

Returns the WHO_AM_I register.

pub fn av_conf(&mut self, comm: &mut Comm) -> Result<AvConf, E>[src]

Returns the AV_CONF register.

pub fn cr1(&mut self, comm: &mut Comm) -> Result<CtrlReg1, E>[src]

Returns the CTRL_REG1 register.

pub fn cr2(&mut self, comm: &mut Comm) -> Result<CtrlReg2, E>[src]

Returns the CTRL_REG2 register.

pub fn cr3(&mut self, comm: &mut Comm) -> Result<CtrlReg3, E>[src]

Returns the CTRL_REG3 register.

pub fn status(&mut self, comm: &mut Comm) -> Result<StatusReg, E>[src]

Returns the STATUS register.

Auto Trait Implementations

impl<Comm, E> RefUnwindSafe for HTS221<Comm, E> where
    Comm: RefUnwindSafe,
    E: RefUnwindSafe

impl<Comm, E> Send for HTS221<Comm, E> where
    Comm: Send,
    E: Send

impl<Comm, E> Sync for HTS221<Comm, E> where
    Comm: Sync,
    E: Sync

impl<Comm, E> Unpin for HTS221<Comm, E> where
    Comm: Unpin,
    E: Unpin

impl<Comm, E> UnwindSafe for HTS221<Comm, E> where
    Comm: UnwindSafe,
    E: 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.