Struct hts221::HTS221
[−]
[src]
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]
Comm: Write<Error = E> + WriteRead<Error = E>,
pub fn humidity_x2(&mut self) -> 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) -> 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) -> Result<WhoAmI, E>
[src]
Returns the WHO_AM_I register.
pub fn av_conf(&mut self) -> Result<AvConf, E>
[src]
Returns the AV_CONF register.
pub fn cr1(&mut self) -> Result<CtrlReg1, E>
[src]
Returns the CTRL_REG1 register.
pub fn cr2(&mut self) -> Result<CtrlReg2, E>
[src]
Returns the CTRL_REG2 register.
pub fn cr3(&mut self) -> Result<CtrlReg3, E>
[src]
Returns the CTRL_REG3 register.
pub fn status(&mut self) -> Result<StatusReg, E>
[src]
Returns the STATUS register.