[−][src]Module hts221::device
I2C interface to the HTS221.
The API is modeled roughly after device crates generated by svd2rust
, though not quite as
type-driven (for example, there are no R or W types). This module provides access to every
register (or set of related registers) defined in the
datasheet.
Modules
av_conf | Constants for AV_CONF. |
calibration | |
cr1 | Constants for CTRL_REG1. |
cr2 | Constants for CTRL_REG2. |
cr3 | Constants for CTRL_REG3. |
h_out | Constants for HUMIDITY_OUT_L and HUMIDITY_OUT_H. |
status | Constants for STATUS. |
t_out | Constants for TEMP_OUT_L and TEMP_OUT_H. |
who_am_i | Constants for WHO_AM_I. |
Structs
AvConf | The AV_CONF register. Controls humidity and temperature resolution modes. |
Calibration | Calibration data for the particular chip. All chips are factory-calibrated, and require no further calibration from the user. |
CtrlReg1 | The CTRL_REG1 register. Contains power on, data transfer mode, and data rate configuration. |
CtrlReg2 | The CTRL_REG2 register. |
CtrlReg3 | The CTRL_REG3 register. |
Device | |
HumidityOut | Combination of HUMIDITY_OUT_L and HUMIDITY_OUT_H registers. |
StatusReg | The STATUS register. |
TemperatureOut | Combination of TEMP_OUT_L and TEMP_OUT_H registers. |
WhoAmI | The WHO_AM_I register, for device identification. |
Constants
I2C_ID_7BIT | 7-bit I2C slave address of the HTS221. Note that the datasheet includes the 8-bit read address (BFh) and 8-bit write address (BEh). |
I2C_ID_8BIT | 8-bit I2C slave address of the HTS221. Note that this is the read address, not the write address. |