[−][src]Struct hts221::HTS221
Interface for the chip.
Methods
impl<Comm, E> HTS221<Comm, E> where
Comm: Write<Error = E> + WriteRead<Error = E>,
[src]
Comm: Write<Error = E> + WriteRead<Error = E>,
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,
Comm: RefUnwindSafe,
E: RefUnwindSafe,
impl<Comm, E> Send for HTS221<Comm, E> where
Comm: Send,
E: Send,
Comm: Send,
E: Send,
impl<Comm, E> Sync for HTS221<Comm, E> where
Comm: Sync,
E: Sync,
Comm: Sync,
E: Sync,
impl<Comm, E> Unpin for HTS221<Comm, E> where
Comm: Unpin,
E: Unpin,
Comm: Unpin,
E: Unpin,
impl<Comm, E> UnwindSafe for HTS221<Comm, E> where
Comm: UnwindSafe,
E: UnwindSafe,
Comm: UnwindSafe,
E: 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>,