Nordic Thingy:52
|
HTS221 humidity sensor API. More...
Data Structures | |
struct | drv_hts221_calib_t |
Calibration struct. More... | |
struct | drv_hts221_cfg_t |
Configuration struct for hts221 humidity sensor. More... | |
struct | drv_hts221_twi_cfg_t |
Initialization struct for humid driver. More... | |
Macros | |
#define | AV_CONF_REG 0x10 |
Humidity and temperature resolution/average mode register. | |
#define | AV_CONF_REG_AVGH_Pos 0 |
Bitmasks for AVGH. | |
#define | AV_CONF_REG_AVGT_Pos 3 |
Bitmasks for AVGT. | |
#define | CTRL_REG1 0x20 |
Control register 1. | |
#define | CTRL_REG1_BDU_Pos 2 |
Bitmasks for BDU. | |
#define | CTRL_REG1_ODR_Pos 0 |
Bitmasks for ODR. | |
#define | CTRL_REG1_PD_Pos 7 |
Bitmasks for PD. | |
#define | CTRL_REG2 0x21 |
Control register 2. | |
#define | CTRL_REG2_BOOT_Pos 7 |
Bitmasks for BOOT. | |
#define | CTRL_REG2_HEATER_Pos 1 |
Bitmasks for HEATER. | |
#define | CTRL_REG2_ONE_SHOT_Pos 0 |
Bitmasks for ONE_SHOT. | |
#define | CTRL_REG3 0x22 |
Control register 3. | |
#define | CTRL_REG3_DRDY_H_L_Pos 7 |
Bitmasks for DRDY_H_L. | |
#define | CTRL_REG3_DRDY_Pos 2 |
Bitmasks for DRDY. | |
#define | CTRL_REG3_PP_OD_Pos 6 |
Bitmasks for PP_OD. | |
#define | HUMIDITY_OUT_H_REG 0x29 |
Relative humidity data (MSB). | |
#define | HUMIDITY_OUT_L_REG 0x28 |
Relative humidity data (LSB). | |
#define | STATUS_REG 0x27 |
Status register. | |
#define | STATUS_REG_H_DA_Pos 1 |
Bitmasks for H_DA. | |
#define | STATUS_REG_T_DA_Pos 0 |
Bitmasks for T_DA. | |
#define | TEMP_OUT_H_REG 0x2B |
Temperature data (MSB). | |
#define | TEMP_OUT_L_REG 0x2A |
Temperature data (LSB). | |
#define | WHO_AM_I_REG 0x0F |
Device identification register. | |
Functions | |
uint32_t | drv_hts221_calib_get (drv_hts221_calib_t *p_calib) |
Function to get the sensor calibration data. More... | |
uint32_t | drv_hts221_cfg_get (drv_hts221_cfg_t *p_cfg) |
Reads the configuration of the hts221 sensor. More... | |
uint32_t | drv_hts221_cfg_set (drv_hts221_cfg_t const *const p_cfg) |
Configures the hts221 sensor according to the specified configuration. More... | |
uint32_t | drv_hts221_close (void) |
Close the hts221 driver. More... | |
uint32_t | drv_hts221_humidity_get (int16_t *p_humidity) |
Function to get the humidity data. More... | |
uint32_t | drv_hts221_init (void) |
Inits the hts221 driver. | |
uint32_t | drv_hts221_one_shot (void) |
Start one shot conversion. More... | |
uint32_t | drv_hts221_open (drv_hts221_twi_cfg_t const *const p_cfg) |
Opens the hts221 driver according to the specified configuration. More... | |
uint32_t | drv_hts221_reboot (void) |
Reboot the hts221 memory content. More... | |
uint32_t | drv_hts221_status_get (uint8_t *p_status) |
Function to get the status. More... | |
uint32_t | drv_hts221_temperature_get (int16_t *p_temperature) |
Function to get the temperature data. More... | |
uint32_t | drv_hts221_verify (void) |
Verify the hts221 who am I register. More... | |
HTS221 humidity sensor API.
uint32_t drv_hts221_calib_get | ( | drv_hts221_calib_t * | p_calib | ) |
Function to get the sensor calibration data.
uint32_t drv_hts221_cfg_get | ( | drv_hts221_cfg_t * | p_cfg | ) |
Reads the configuration of the hts221 sensor.
[in] | p_cfg | Pointer to the driver configuration for the session to be opened. |
uint32_t drv_hts221_cfg_set | ( | drv_hts221_cfg_t const *const | p_cfg | ) |
Configures the hts221 sensor according to the specified configuration.
[in] | p_cfg | Pointer to the sensor configuration. |
uint32_t drv_hts221_close | ( | void | ) |
Close the hts221 driver.
uint32_t drv_hts221_humidity_get | ( | int16_t * | p_humidity | ) |
Function to get the humidity data.
uint32_t drv_hts221_one_shot | ( | void | ) |
Start one shot conversion.
uint32_t drv_hts221_open | ( | drv_hts221_twi_cfg_t const *const | p_cfg | ) |
Opens the hts221 driver according to the specified configuration.
[in] | p_cfg | Pointer to the driver configuration for the session to be opened. |
uint32_t drv_hts221_reboot | ( | void | ) |
Reboot the hts221 memory content.
uint32_t drv_hts221_status_get | ( | uint8_t * | p_status | ) |
Function to get the status.
uint32_t drv_hts221_temperature_get | ( | int16_t * | p_temperature | ) |
Function to get the temperature data.
uint32_t drv_hts221_verify | ( | void | ) |
Verify the hts221 who am I register.