ChibiOS 21.11.4

Detailed Description

Collaboration diagram for HTS221:

HTS221 data structures and types.

enum  hts221_odr_t { HTS221_ODR_ONE_SHOT = 0x00 , HTS221_ODR_1HZ = 0x01 , HTS221_ODR_7HZ = 0x02 , HTS221_ODR_12P5HZ = 0x03 }
 HTS221 output data rate and bandwidth. More...
enum  hts221_avgh_t {
  HTS221_AVGH_4 = 0x00 , HTS221_AVGH_8 = 0x01 , HTS221_AVGH_16 = 0x02 , HTS221_AVGH_32 = 0x03 ,
  HTS221_AVGH_64 = 0x04 , HTS221_AVGH_128 = 0x05 , HTS221_AVGH_256 = 0x06 , HTS221_AVGH_512 = 0x07
}
 HTS221 humidity resolution. More...
enum  hts221_avgt_t {
  HTS221_AVGT_2 = 0x00 , HTS221_AVGT_4 = 0x08 , HTS221_AVGT_8 = 0x10 , HTS221_AVGT_16 = 0x18 ,
  HTS221_AVGT_32 = 0x20 , HTS221_AVGT_64 = 0x28 , HTS221_AVGT_128 = 0x30 , HTS221_AVGT_256 = 0x38
}
 HTS221 temperature resolution. More...
enum  hts221_bdu_t { HTS221_BDU_CONTINUOUS = 0x00 , HTS221_BDU_BLOCKED = 0x40 }
 HTS221 block data update. More...
enum  hts221_state_t { HTS221_UNINIT = 0 , HTS221_STOP = 1 , HTS221_READY = 2 }
 Driver state machine possible states. More...
typedef struct HTS221Driver HTS221Driver
 Structure representing a HTS221 driver.
#define _hts221_methods_alone
 HTS221 specific methods.
#define _hts221_methods
 HTS221 specific methods with inherited ones.
#define _hts221_data
 HTS221Driver specific data.

Version identification

#define EX_HTS221_VERSION   "1.1.2"
 HTS221 driver version string.
#define EX_HTS221_MAJOR   1
 HTS221 driver version major number.
#define EX_HTS221_MINOR   1
 HTS221 driver version minor number.
#define EX_HTS221_PATCH   2
 HTS221 driver version patch number.
#define HTS221_HYGRO_NUMBER_OF_AXES   1U
 HTS221 hygrometer subsystem characteristics.
#define HTS221_HYGRO_SENS   0.00390625f
#define HTS221_HYGRO_BIAS   0.0f
#define HTS221_THERMO_NUMBER_OF_AXES   1U
 HTS221 thermometer subsystem characteristics.
#define HTS221_THERMO_SENS   0.0015625f
#define HTS221_THERMO_BIAS   0.0f

HTS221 communication interfaces related bit masks

#define HTS221_DI_MASK   0xFF
#define HTS221_DI(n)
#define HTS221_AD_MASK   0x3F
#define HTS221_AD(n)
#define HTS221_MS   (1 << 6)
#define HTS221_RW   (1 << 7)
#define HTS221_SUB_MS   (1 << 7)
#define HTS221_SAD   0x5F

HTS221 register addresses

#define HTS221_AD_WHO_AM_I   0x0F
#define HTS221_AD_AV_CONF   0x10
#define HTS221_AD_CTRL_REG1   0x20
#define HTS221_AD_CTRL_REG2   0x21
#define HTS221_AD_CTRL_REG3   0x22
#define HTS221_AD_STATUS_REG   0x27
#define HTS221_AD_HUMIDITY_OUT_L   0x28
#define HTS221_AD_HUMIDITY_OUT_H   0x29
#define HTS221_AD_TEMP_OUT_L   0x2A
#define HTS221_AD_TEMP_OUT_H   0x2B
#define HTS221_AD_CALIB_0   0x30
#define HTS221_AD_CALIB_1   0x31
#define HTS221_AD_CALIB_2   0x32
#define HTS221_AD_CALIB_3   0x33
#define HTS221_AD_CALIB_4   0x34
#define HTS221_AD_CALIB_5   0x35
#define HTS221_AD_CALIB_6   0x36
#define HTS221_AD_CALIB_7   0x37
#define HTS221_AD_CALIB_8   0x38
#define HTS221_AD_CALIB_9   0x39
#define HTS221_AD_CALIB_A   0x3A
#define HTS221_AD_CALIB_B   0x3B
#define HTS221_AD_CALIB_C   0x3C
#define HTS221_AD_CALIB_D   0x3D
#define HTS221_AD_CALIB_E   0x3E
#define HTS221_AD_CALIB_F   0x3F

HTS221_CTRL_REG1 register bits definitions

#define HTS221_CTRL_REG1_MASK   0x87
#define HTS221_CTRL_REG1_ODR0   (1 << 0)
#define HTS221_CTRL_REG1_ODR1   (1 << 1)
#define HTS221_CTRL_REG1_BDU   (1 << 2)
#define HTS221_CTRL_REG1_PD   (1 << 7)

HTS221_CTRL_REG2 register bits definitions

#define HTS221_CTRL_REG2_MASK   0x83
#define HTS221_CTRL_REG2_ONE_SHOT   (1 << 0)
#define HTS221_CTRL_REG2_HEATER   (1 << 1)
#define HTS221_CTRL_REG2_BOOT   (1 << 7)

HTS221_CTRL_REG3 register bits definitions

#define HTS221_CTRL_REG3_MASK   0xC4
#define HTS221_CTRL_REG3_DRDY   (1 << 2)
#define HTS221_CTRL_REG3_PP_OD   (1 << 6)
#define HTS221_CTRL_REG3_INT_H_L   (1 << 7)

Configuration options

#define HTS221_USE_SPI   FALSE
 HTS221 SPI interface switch.
#define HTS221_SHARED_SPI   FALSE
 HTS221 shared SPI switch.
#define HTS221_USE_I2C   TRUE
 HTS221 I2C interface switch.
#define HTS221_SHARED_I2C   FALSE
 HTS221 shared I2C switch.
#define HTS221_USE_ADVANCED   FALSE
 HTS221 advanced configurations switch.

Data Structures

struct  HTS221Config
 HTS221 configuration structure. More...
struct  HTS221VMT
 HTS221 virtual methods table. More...
struct  HTS221Driver
 HTS221 2-axis hygrometer/thermometer class. More...

Macros

#define HTS221_SEL(mask, offset)
#define HTS221_FLAG_HYGRO_BIAS   0x01
#define HTS221_FLAG_HYGRO_SENS   0x02
#define HTS221_FLAG_THERMO_BIAS   0x04
#define HTS221_FLAG_THERMO_SENS   0x08
#define hts221HygrometerGetAxesNumber(devp)
 Return the number of axes of the BaseHygrometer.
#define hts221HygrometerReadRaw(devp, axes)
 Retrieves raw data from the BaseHygrometer.
#define hts221HygrometerReadCooked(devp, axes)
 Retrieves cooked data from the BaseHygrometer.
#define hts221HygrometerSetBias(devp, bp)
 Set bias values for the BaseHygrometer.
#define hts221HygrometerResetBias(devp)
 Reset bias values for the BaseHygrometer.
#define hts221HygrometerSetSensitivity(devp, sp)
 Set sensitivity values for the BaseHygrometer.
#define hts221HygrometerResetSensitivity(devp)
 Reset sensitivity values for the BaseHygrometer.
#define hts221ThermometerGetAxesNumber(devp)
 Return the number of axes of the BaseThermometer.
#define hts221ThermometerReadRaw(devp, axes)
 Retrieves raw data from the BaseThermometer.
#define hts221ThermometerReadCooked(devp, axes)
 Retrieves cooked data from the BaseThermometer.
#define hts221ThermometerSetBias(devp, bp)
 Set bias values for the BaseThermometer.
#define hts221ThermometerResetBias(devp)
 Reset bias values for the BaseThermometer.
#define hts221ThermometerSetSensitivity(devp, sp)
 Set sensitivity values for the BaseThermometer.
#define hts221ThermometerResetSensitivity(devp)
 Reset sensitivity values for the BaseThermometer.

Functions

static msg_t hts221I2CReadRegister (I2CDriver *i2cp, uint8_t reg, uint8_t *rxbuf, size_t n)
 Reads registers value using I2C.
static msg_t hts221I2CWriteRegister (I2CDriver *i2cp, uint8_t *txbuf, size_t n)
 Writes a value into a register using I2C.
static msg_t hts221Calibrate (HTS221Driver *devp)
 Computes biases and sensitivities starting from data stored in calibration registers.
static size_t hygro_get_axes_number (void *ip)
 Return the number of axes of the BaseHygrometer.
static msg_t hygro_read_raw (void *ip, int32_t axes[])
 Retrieves raw data from the BaseHygrometer.
static msg_t hygro_read_cooked (void *ip, float axes[])
 Retrieves cooked data from the BaseHygrometer.
static msg_t hygro_set_bias (void *ip, float *bp)
 Set bias values for the BaseHygrometer.
static msg_t hygro_reset_bias (void *ip)
 Reset bias values for the BaseHygrometer.
static msg_t hygro_set_sensitivity (void *ip, float *sp)
 Set sensitivity values for the BaseHygrometer.
static msg_t hygro_reset_sensitivity (void *ip)
 Reset sensitivity values for the BaseHygrometer.
static size_t thermo_get_axes_number (void *ip)
 Return the number of axes of the BaseThermometer.
static msg_t thermo_read_raw (void *ip, int32_t axes[])
 Retrieves raw data from the BaseThermometer.
static msg_t thermo_read_cooked (void *ip, float *axis)
 Retrieves cooked data from the BaseThermometer.
static msg_t thermo_set_bias (void *ip, float *bp)
 Set bias values for the BaseThermometer.
static msg_t thermo_reset_bias (void *ip)
 Reset bias values for the BaseThermometer.
static msg_t thermo_set_sensitivity (void *ip, float *sp)
 Set sensitivity values for the BaseThermometer.
static msg_t thermo_reset_sensitivity (void *ip)
 Reset sensitivity values for the BaseThermometer.
void hts221ObjectInit (HTS221Driver *devp)
 Initializes an instance.
void hts221Start (HTS221Driver *devp, const HTS221Config *config)
 Configures and activates HTS221 Complex Driver peripheral.
void hts221Stop (HTS221Driver *devp)
 Deactivates the HTS221 Complex Driver peripheral.

Variables

static const struct HTS221VMT vmt_device
static const struct BaseHygrometerVMT vmt_hygrometer
static const struct BaseThermometerVMT vmt_thermometer

Macro Definition Documentation

◆ HTS221_SEL

#define HTS221_SEL ( mask,
offset )
Value:
(int16_t)(mask << offset)

Definition at line 37 of file hts221.c.

Referenced by hts221Calibrate().

◆ HTS221_FLAG_HYGRO_BIAS

#define HTS221_FLAG_HYGRO_BIAS   0x01

Definition at line 39 of file hts221.c.

◆ HTS221_FLAG_HYGRO_SENS

#define HTS221_FLAG_HYGRO_SENS   0x02

Definition at line 40 of file hts221.c.

◆ HTS221_FLAG_THERMO_BIAS

#define HTS221_FLAG_THERMO_BIAS   0x04

Definition at line 41 of file hts221.c.

◆ HTS221_FLAG_THERMO_SENS

#define HTS221_FLAG_THERMO_SENS   0x08

Definition at line 42 of file hts221.c.

◆ EX_HTS221_VERSION

#define EX_HTS221_VERSION   "1.1.2"

HTS221 driver version string.

Definition at line 47 of file hts221.h.

◆ EX_HTS221_MAJOR

#define EX_HTS221_MAJOR   1

HTS221 driver version major number.

Definition at line 52 of file hts221.h.

◆ EX_HTS221_MINOR

#define EX_HTS221_MINOR   1

HTS221 driver version minor number.

Definition at line 57 of file hts221.h.

◆ EX_HTS221_PATCH

#define EX_HTS221_PATCH   2

HTS221 driver version patch number.

Definition at line 62 of file hts221.h.

◆ HTS221_HYGRO_NUMBER_OF_AXES

#define HTS221_HYGRO_NUMBER_OF_AXES   1U

HTS221 hygrometer subsystem characteristics.

Note
Sensitivity is expressed as rH/LSB whereas rH stand for percentage of relative humidity.
Bias is expressed as rH.

Definition at line 72 of file hts221.h.

Referenced by hts221ObjectInit(), and hygro_get_axes_number().

◆ HTS221_HYGRO_SENS

#define HTS221_HYGRO_SENS   0.00390625f

Definition at line 74 of file hts221.h.

◆ HTS221_HYGRO_BIAS

#define HTS221_HYGRO_BIAS   0.0f

Definition at line 75 of file hts221.h.

◆ HTS221_THERMO_NUMBER_OF_AXES

#define HTS221_THERMO_NUMBER_OF_AXES   1U

HTS221 thermometer subsystem characteristics.

Note
Sensitivity is expressed as �C/LSB.
Bias is expressed as �C.

Definition at line 85 of file hts221.h.

Referenced by hts221ObjectInit(), and thermo_get_axes_number().

◆ HTS221_THERMO_SENS

#define HTS221_THERMO_SENS   0.0015625f

Definition at line 87 of file hts221.h.

◆ HTS221_THERMO_BIAS

#define HTS221_THERMO_BIAS   0.0f

Definition at line 88 of file hts221.h.

◆ HTS221_DI_MASK

#define HTS221_DI_MASK   0xFF

Definition at line 95 of file hts221.h.

◆ HTS221_DI

#define HTS221_DI ( n)
Value:
(1 << n)

Definition at line 96 of file hts221.h.

◆ HTS221_AD_MASK

#define HTS221_AD_MASK   0x3F

Definition at line 97 of file hts221.h.

◆ HTS221_AD

#define HTS221_AD ( n)
Value:
(1 << n)

Definition at line 98 of file hts221.h.

◆ HTS221_MS

#define HTS221_MS   (1 << 6)

Definition at line 99 of file hts221.h.

◆ HTS221_RW

#define HTS221_RW   (1 << 7)

Definition at line 100 of file hts221.h.

◆ HTS221_SUB_MS

#define HTS221_SUB_MS   (1 << 7)

Definition at line 102 of file hts221.h.

Referenced by hts221I2CReadRegister(), and hts221I2CWriteRegister().

◆ HTS221_SAD

#define HTS221_SAD   0x5F

Definition at line 104 of file hts221.h.

Referenced by hts221I2CReadRegister(), and hts221I2CWriteRegister().

◆ HTS221_AD_WHO_AM_I

#define HTS221_AD_WHO_AM_I   0x0F

Definition at line 111 of file hts221.h.

◆ HTS221_AD_AV_CONF

#define HTS221_AD_AV_CONF   0x10

Definition at line 112 of file hts221.h.

Referenced by hts221Start().

◆ HTS221_AD_CTRL_REG1

#define HTS221_AD_CTRL_REG1   0x20

Definition at line 113 of file hts221.h.

Referenced by hts221Start(), and hts221Stop().

◆ HTS221_AD_CTRL_REG2

#define HTS221_AD_CTRL_REG2   0x21

Definition at line 114 of file hts221.h.

◆ HTS221_AD_CTRL_REG3

#define HTS221_AD_CTRL_REG3   0x22

Definition at line 115 of file hts221.h.

◆ HTS221_AD_STATUS_REG

#define HTS221_AD_STATUS_REG   0x27

Definition at line 116 of file hts221.h.

◆ HTS221_AD_HUMIDITY_OUT_L

#define HTS221_AD_HUMIDITY_OUT_L   0x28

Definition at line 117 of file hts221.h.

Referenced by hygro_read_raw().

◆ HTS221_AD_HUMIDITY_OUT_H

#define HTS221_AD_HUMIDITY_OUT_H   0x29

Definition at line 118 of file hts221.h.

◆ HTS221_AD_TEMP_OUT_L

#define HTS221_AD_TEMP_OUT_L   0x2A

Definition at line 119 of file hts221.h.

Referenced by thermo_read_raw().

◆ HTS221_AD_TEMP_OUT_H

#define HTS221_AD_TEMP_OUT_H   0x2B

Definition at line 120 of file hts221.h.

◆ HTS221_AD_CALIB_0

#define HTS221_AD_CALIB_0   0x30

Definition at line 121 of file hts221.h.

Referenced by hts221Calibrate().

◆ HTS221_AD_CALIB_1

#define HTS221_AD_CALIB_1   0x31

Definition at line 122 of file hts221.h.

◆ HTS221_AD_CALIB_2

#define HTS221_AD_CALIB_2   0x32

Definition at line 123 of file hts221.h.

◆ HTS221_AD_CALIB_3

#define HTS221_AD_CALIB_3   0x33

Definition at line 124 of file hts221.h.

◆ HTS221_AD_CALIB_4

#define HTS221_AD_CALIB_4   0x34

Definition at line 125 of file hts221.h.

◆ HTS221_AD_CALIB_5

#define HTS221_AD_CALIB_5   0x35

Definition at line 126 of file hts221.h.

◆ HTS221_AD_CALIB_6

#define HTS221_AD_CALIB_6   0x36

Definition at line 127 of file hts221.h.

◆ HTS221_AD_CALIB_7

#define HTS221_AD_CALIB_7   0x37

Definition at line 128 of file hts221.h.

◆ HTS221_AD_CALIB_8

#define HTS221_AD_CALIB_8   0x38

Definition at line 129 of file hts221.h.

◆ HTS221_AD_CALIB_9

#define HTS221_AD_CALIB_9   0x39

Definition at line 130 of file hts221.h.

◆ HTS221_AD_CALIB_A

#define HTS221_AD_CALIB_A   0x3A

Definition at line 131 of file hts221.h.

◆ HTS221_AD_CALIB_B

#define HTS221_AD_CALIB_B   0x3B

Definition at line 132 of file hts221.h.

◆ HTS221_AD_CALIB_C

#define HTS221_AD_CALIB_C   0x3C

Definition at line 133 of file hts221.h.

◆ HTS221_AD_CALIB_D

#define HTS221_AD_CALIB_D   0x3D

Definition at line 134 of file hts221.h.

◆ HTS221_AD_CALIB_E

#define HTS221_AD_CALIB_E   0x3E

Definition at line 135 of file hts221.h.

◆ HTS221_AD_CALIB_F

#define HTS221_AD_CALIB_F   0x3F

Definition at line 136 of file hts221.h.

◆ HTS221_CTRL_REG1_MASK

#define HTS221_CTRL_REG1_MASK   0x87

Definition at line 143 of file hts221.h.

◆ HTS221_CTRL_REG1_ODR0

#define HTS221_CTRL_REG1_ODR0   (1 << 0)

Definition at line 144 of file hts221.h.

◆ HTS221_CTRL_REG1_ODR1

#define HTS221_CTRL_REG1_ODR1   (1 << 1)

Definition at line 145 of file hts221.h.

◆ HTS221_CTRL_REG1_BDU

#define HTS221_CTRL_REG1_BDU   (1 << 2)

Definition at line 146 of file hts221.h.

◆ HTS221_CTRL_REG1_PD

#define HTS221_CTRL_REG1_PD   (1 << 7)

Definition at line 147 of file hts221.h.

Referenced by hts221Start().

◆ HTS221_CTRL_REG2_MASK

#define HTS221_CTRL_REG2_MASK   0x83

Definition at line 154 of file hts221.h.

◆ HTS221_CTRL_REG2_ONE_SHOT

#define HTS221_CTRL_REG2_ONE_SHOT   (1 << 0)

Definition at line 155 of file hts221.h.

◆ HTS221_CTRL_REG2_HEATER

#define HTS221_CTRL_REG2_HEATER   (1 << 1)

Definition at line 156 of file hts221.h.

◆ HTS221_CTRL_REG2_BOOT

#define HTS221_CTRL_REG2_BOOT   (1 << 7)

Definition at line 157 of file hts221.h.

◆ HTS221_CTRL_REG3_MASK

#define HTS221_CTRL_REG3_MASK   0xC4

Definition at line 164 of file hts221.h.

◆ HTS221_CTRL_REG3_DRDY

#define HTS221_CTRL_REG3_DRDY   (1 << 2)

Definition at line 165 of file hts221.h.

◆ HTS221_CTRL_REG3_PP_OD

#define HTS221_CTRL_REG3_PP_OD   (1 << 6)

Definition at line 166 of file hts221.h.

◆ HTS221_CTRL_REG3_INT_H_L

#define HTS221_CTRL_REG3_INT_H_L   (1 << 7)

Definition at line 167 of file hts221.h.

◆ HTS221_USE_SPI

#define HTS221_USE_SPI   FALSE

HTS221 SPI interface switch.

If set to TRUE the support for SPI is included.

Note
The default is FALSE.

Definition at line 184 of file hts221.h.

◆ HTS221_SHARED_SPI

#define HTS221_SHARED_SPI   FALSE

HTS221 shared SPI switch.

If set to TRUE the device acquires SPI bus ownership on each transaction.

Note
The default is FALSE. Requires SPI_USE_MUTUAL_EXCLUSION

Definition at line 194 of file hts221.h.

◆ HTS221_USE_I2C

#define HTS221_USE_I2C   TRUE

HTS221 I2C interface switch.

If set to TRUE the support for I2C is included.

Note
The default is TRUE.

Definition at line 203 of file hts221.h.

◆ HTS221_SHARED_I2C

#define HTS221_SHARED_I2C   FALSE

HTS221 shared I2C switch.

If set to TRUE the device acquires I2C bus ownership on each transaction.

Note
The default is FALSE. Requires I2C_USE_MUTUAL_EXCLUSION

Definition at line 213 of file hts221.h.

◆ HTS221_USE_ADVANCED

#define HTS221_USE_ADVANCED   FALSE

HTS221 advanced configurations switch.

If set to TRUE more configurations are available.

Note
The default is FALSE.

Definition at line 222 of file hts221.h.

◆ _hts221_methods_alone

#define _hts221_methods_alone

HTS221 specific methods.

Note
No methods so far, just a common ancestor interface.

Definition at line 390 of file hts221.h.

◆ _hts221_methods

#define _hts221_methods
Value:
_base_object_methods \
_hts221_methods_alone

HTS221 specific methods with inherited ones.

Definition at line 395 of file hts221.h.

◆ _hts221_data

#define _hts221_data
Value:
/* Driver state.*/ \
hts221_state_t state; \
/* Current configuration data.*/ \
const HTS221Config *config; \
/* Hygrometer subsystem axes number.*/ \
size_t hygroaxes; \
/* Hygrometer subsystem current sensitivity.*/ \
float hygrosensitivity; \
/* Hygrometer subsystem current bias .*/ \
float hygrobias; \
/* Hygrometer subsystem factory sensitivity.*/ \
float hygrofactorysensitivity; \
/* Hygrometer subsystem factory bias .*/ \
float hygrofactorybias; \
/* Thermometer subsystem axes number.*/ \
size_t thermoaxes; \
/* Thermometer subsystem current sensitivity.*/ \
float thermosensitivity; \
/* Thermometer subsystem current bias.*/ \
float thermobias; \
/* Thermometer subsystem factory sensitivity.*/ \
float thermofactorysensitivity; \
/* Thermometer subsystem factory bias.*/ \
float thermofactorybias;
hts221_state_t
Driver state machine possible states.
Definition hts221.h:319
HTS221 configuration structure.
Definition hts221.h:328

HTS221Driver specific data.

Definition at line 411 of file hts221.h.

◆ hts221HygrometerGetAxesNumber

#define hts221HygrometerGetAxesNumber ( devp)
Value:
hygrometerGetAxesNumber(&((devp)->hygro_if))

Return the number of axes of the BaseHygrometer.

Parameters
[in]devppointer to HTS221Driver.
Returns
the number of axes.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 464 of file hts221.h.

◆ hts221HygrometerReadRaw

#define hts221HygrometerReadRaw ( devp,
axes )
Value:
hygrometerReadRaw(&((devp)->hygro_if), axes)
#define hygrometerReadRaw(ip, dp)
Hygrometer read raw data.

Retrieves raw data from the BaseHygrometer.

Note
This data is retrieved from MEMS register without any algebraical manipulation.
The axes array must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[out]axesa buffer which would be filled with raw data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 485 of file hts221.h.

◆ hts221HygrometerReadCooked

#define hts221HygrometerReadCooked ( devp,
axes )
Value:
hygrometerReadCooked(&((devp)->hygro_if), axes)
#define hygrometerReadCooked(ip, dp)
Hygrometer read cooked data.

Retrieves cooked data from the BaseHygrometer.

Note
This data is manipulated according to the formula cooked = (raw * sensitivity) - bias.
Final data is expressed as rH.
The axes array must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[out]axesa buffer which would be filled with cooked data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 507 of file hts221.h.

◆ hts221HygrometerSetBias

#define hts221HygrometerSetBias ( devp,
bp )
Value:
hygrometerSetBias(&((devp)->hygro_if), bp)
#define hygrometerSetBias(ip, bp)
Updates hygrometer bias data from received buffer.

Set bias values for the BaseHygrometer.

Note
Bias must be expressed as rH.
The bias buffer must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[in]bpa buffer which contains biases.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 524 of file hts221.h.

◆ hts221HygrometerResetBias

#define hts221HygrometerResetBias ( devp)
Value:
hygrometerResetBias(&((devp)->hygro_if))
#define hygrometerResetBias(ip)
Reset hygrometer bias data restoring it to zero.

Reset bias values for the BaseHygrometer.

Note
Default biases value are obtained from device datasheet when available otherwise they are considered zero.
Parameters
[in]devppointer to HTS221Driver.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 539 of file hts221.h.

◆ hts221HygrometerSetSensitivity

#define hts221HygrometerSetSensitivity ( devp,
sp )
Value:
hygrometerSetSensitivity(&((devp)->hygro_if), sp)
#define hygrometerSetSensitivity(ip, sp)
Updates hygrometer sensitivity data from received buffer.

Set sensitivity values for the BaseHygrometer.

Note
Sensitivity must be expressed as rH/LSB.
The sensitivity buffer must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[in]spa buffer which contains sensitivities.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 556 of file hts221.h.

◆ hts221HygrometerResetSensitivity

#define hts221HygrometerResetSensitivity ( devp)
Value:
hygrometerResetSensitivity(&((devp)->hygro_if))
#define hygrometerResetSensitivity(ip)
Reset hygrometer sensitivity data restoring it to its typical value.

Reset sensitivity values for the BaseHygrometer.

Note
Default sensitivities value are obtained from device datasheet.
Parameters
[in]devppointer to HTS221Driver.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 570 of file hts221.h.

◆ hts221ThermometerGetAxesNumber

#define hts221ThermometerGetAxesNumber ( devp)
Value:
thermometerGetAxesNumber(&((devp)->thermo_if))

Return the number of axes of the BaseThermometer.

Parameters
[in]devppointer to HTS221Driver.
Returns
the number of axes.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 582 of file hts221.h.

◆ hts221ThermometerReadRaw

#define hts221ThermometerReadRaw ( devp,
axes )
Value:
thermometerReadRaw(&((devp)->thermo_if), axes)
#define thermometerReadRaw(ip, dp)
Thermometer read raw data.

Retrieves raw data from the BaseThermometer.

Note
This data is retrieved from MEMS register without any algebraical manipulation.
The axes array must be at least the same size of the BaseThermometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[out]axesa buffer which would be filled with raw data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 603 of file hts221.h.

◆ hts221ThermometerReadCooked

#define hts221ThermometerReadCooked ( devp,
axes )
Value:
thermometerReadCooked(&((devp)->thermo_if), axes)
#define thermometerReadCooked(ip, dp)
Thermometer read cooked data.

Retrieves cooked data from the BaseThermometer.

Note
This data is manipulated according to the formula cooked = (raw * sensitivity) - bias.
Final data is expressed as �C.
The axes array must be at least the same size of the BaseThermometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[out]axesa buffer which would be filled with cooked data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 625 of file hts221.h.

◆ hts221ThermometerSetBias

#define hts221ThermometerSetBias ( devp,
bp )
Value:
thermometerSetBias(&((devp)->thermo_if), bp)
#define thermometerSetBias(ip, bp)
Updates thermometer bias data from received buffer.

Set bias values for the BaseThermometer.

Note
Bias must be expressed as �C.
The bias buffer must be at least the same size of the BaseThermometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[in]bpa buffer which contains biases.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 642 of file hts221.h.

◆ hts221ThermometerResetBias

#define hts221ThermometerResetBias ( devp)
Value:
thermometerResetBias(&((devp)->thermo_if))
#define thermometerResetBias(ip)
Reset thermometer bias data restoring it to zero.

Reset bias values for the BaseThermometer.

Note
Default biases value are obtained from device datasheet when available otherwise they are considered zero.
Parameters
[in]devppointer to HTS221Driver.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 657 of file hts221.h.

◆ hts221ThermometerSetSensitivity

#define hts221ThermometerSetSensitivity ( devp,
sp )
Value:
thermometerSetSensitivity(&((devp)->thermo_if), sp)
#define thermometerSetSensitivity(ip, sp)
Updates thermometer sensitivity data from received buffer.

Set sensitivity values for the BaseThermometer.

Note
Sensitivity must be expressed as �C/LSB.
The sensitivity buffer must be at least the same size of the BaseThermometer axes number.
Parameters
[in]devppointer to HTS221Driver.
[in]spa buffer which contains sensitivities.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 674 of file hts221.h.

◆ hts221ThermometerResetSensitivity

#define hts221ThermometerResetSensitivity ( devp)
Value:
thermometerResetSensitivity(&((devp)->thermo_if))
#define thermometerResetSensitivity(ip)
Reset thermometer sensitivity data restoring it to its typical value.

Reset sensitivity values for the BaseThermometer.

Note
Default sensitivities value are obtained from device datasheet.
Parameters
[in]devppointer to HTS221Driver.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 688 of file hts221.h.

Typedef Documentation

◆ HTS221Driver

typedef struct HTS221Driver HTS221Driver

Structure representing a HTS221 driver.

Definition at line 268 of file hts221.h.

Enumeration Type Documentation

◆ hts221_odr_t

HTS221 output data rate and bandwidth.

Enumerator
HTS221_ODR_ONE_SHOT 

One shot.

HTS221_ODR_1HZ 

Output data rate 1 Hz.

HTS221_ODR_7HZ 

Output data rate 7 Hz.

HTS221_ODR_12P5HZ 

Output data rate 12.5 Hz.

Definition at line 273 of file hts221.h.

◆ hts221_avgh_t

HTS221 humidity resolution.

Enumerator
HTS221_AVGH_4 

Number of internal average is 4.

HTS221_AVGH_8 

Number of internal average is 8.

HTS221_AVGH_16 

Number of internal average is 16.

HTS221_AVGH_32 

Number of internal average is 32.

HTS221_AVGH_64 

Number of internal average is 64.

HTS221_AVGH_128 

Number of internal average is 128.

HTS221_AVGH_256 

Number of internal average is 256.

HTS221_AVGH_512 

Number of internal average is 512.

Definition at line 283 of file hts221.h.

◆ hts221_avgt_t

HTS221 temperature resolution.

Enumerator
HTS221_AVGT_2 

Number of internal average is 2.

HTS221_AVGT_4 

Number of internal average is 4.

HTS221_AVGT_8 

Number of internal average is 8.

HTS221_AVGT_16 

Number of internal average is 16.

HTS221_AVGT_32 

Number of internal average is 32.

HTS221_AVGT_64 

Number of internal average is 64.

HTS221_AVGT_128 

Number of internal average is 128.

HTS221_AVGT_256 

Number of internal average is 256.

Definition at line 297 of file hts221.h.

◆ hts221_bdu_t

HTS221 block data update.

Enumerator
HTS221_BDU_CONTINUOUS 

Block data continuously updated.

HTS221_BDU_BLOCKED 

Block data updated after reading.

Definition at line 311 of file hts221.h.

◆ hts221_state_t

Driver state machine possible states.

Enumerator
HTS221_UNINIT 

Not initialized.

HTS221_STOP 

Stopped.

HTS221_READY 

Ready.

Definition at line 319 of file hts221.h.

Function Documentation

◆ hts221I2CReadRegister()

msg_t hts221I2CReadRegister ( I2CDriver * i2cp,
uint8_t reg,
uint8_t * rxbuf,
size_t n )
static

Reads registers value using I2C.

Precondition
The I2C interface must be initialized and the driver started.
Parameters
[in]i2cppointer to the I2C interface
[in]regfirst sub-register address
[out]rxbufpointer to an output buffer
[in]nnumber of consecutive register to read
Returns
the operation status.
Function Class:
Not an API, this function is for internal use only.

Definition at line 69 of file hts221.c.

References HTS221_SAD, HTS221_SUB_MS, i2cMasterTransmitTimeout(), and TIME_INFINITE.

Referenced by hts221Calibrate(), hygro_read_raw(), and thermo_read_raw().

Here is the call graph for this function:

◆ hts221I2CWriteRegister()

msg_t hts221I2CWriteRegister ( I2CDriver * i2cp,
uint8_t * txbuf,
size_t n )
static

Writes a value into a register using I2C.

Precondition
The I2C interface must be initialized and the driver started.
Parameters
[in]i2cppointer to the I2C interface
[in]txbufbuffer containing sub-address value in first position and values to write
[in]nsize of txbuf less one (not considering the first element)
Returns
the operation status.
Function Class:
Not an API, this function is for internal use only.

Definition at line 92 of file hts221.c.

References HTS221_SAD, HTS221_SUB_MS, i2cMasterTransmitTimeout(), and TIME_INFINITE.

Referenced by hts221Start(), and hts221Stop().

Here is the call graph for this function:

◆ hts221Calibrate()

msg_t hts221Calibrate ( HTS221Driver * devp)
static

Computes biases and sensitivities starting from data stored in calibration registers.

Note
Factory bias and sensitivity values are stored into the driver structure.
Parameters
[in]devppointer to the HTS221 interface
Returns
the operation status.
Function Class:
Not an API, this function is for internal use only.

Definition at line 112 of file hts221.c.

References HTS221_AD_CALIB_0, HTS221_SEL, and hts221I2CReadRegister().

Referenced by hts221Start().

Here is the call graph for this function:

◆ hygro_get_axes_number()

size_t hygro_get_axes_number ( void * ip)
static

Return the number of axes of the BaseHygrometer.

Parameters
[in]ippointer to BaseHygrometer interface.
Returns
the number of axes.

Definition at line 173 of file hts221.c.

References HTS221_HYGRO_NUMBER_OF_AXES.

◆ hygro_read_raw()

msg_t hygro_read_raw ( void * ip,
int32_t axes[] )
static

Retrieves raw data from the BaseHygrometer.

Note
This data is retrieved from MEMS register without any algebraical manipulation.
The axes array must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]ippointer to BaseHygrometer interface.
[out]axesa buffer which would be filled with raw data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.

Definition at line 195 of file hts221.c.

References HTS221_AD_HUMIDITY_OUT_L, HTS221_READY, hts221I2CReadRegister(), I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

Referenced by hygro_read_cooked().

Here is the call graph for this function:

◆ hygro_read_cooked()

msg_t hygro_read_cooked ( void * ip,
float axes[] )
static

Retrieves cooked data from the BaseHygrometer.

Note
This data is manipulated according to the formula cooked = (raw * sensitivity) - bias.
Final data is expressed as rH.
The axes array must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]ippointer to BaseHygrometer interface.
[out]axesa buffer which would be filled with cooked data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.

Definition at line 249 of file hts221.c.

References HTS221_READY, hygro_read_raw(), objGetInstance, osalDbgAssert, and osalDbgCheck.

Here is the call graph for this function:

◆ hygro_set_bias()

msg_t hygro_set_bias ( void * ip,
float * bp )
static

Set bias values for the BaseHygrometer.

Note
Bias must be expressed as rH.
The bias buffer must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]ippointer to BaseHygrometer interface.
[in]bpa buffer which contains biases.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.

Definition at line 284 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ hygro_reset_bias()

msg_t hygro_reset_bias ( void * ip)
static

Reset bias values for the BaseHygrometer.

Note
Default biases value are obtained from device datasheet when available otherwise they are considered zero.
Parameters
[in]ippointer to BaseHygrometer interface.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.

Definition at line 310 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ hygro_set_sensitivity()

msg_t hygro_set_sensitivity ( void * ip,
float * sp )
static

Set sensitivity values for the BaseHygrometer.

Note
Sensitivity must be expressed as rH/LSB.
The sensitivity buffer must be at least the same size of the BaseHygrometer axes number.
Parameters
[in]ippointer to BaseHygrometer interface.
[in]spa buffer which contains sensitivities.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.

Definition at line 338 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ hygro_reset_sensitivity()

msg_t hygro_reset_sensitivity ( void * ip)
static

Reset sensitivity values for the BaseHygrometer.

Note
Default sensitivities value are obtained from device datasheet.
Parameters
[in]ippointer to BaseHygrometer interface.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.

Definition at line 363 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ thermo_get_axes_number()

size_t thermo_get_axes_number ( void * ip)
static

Return the number of axes of the BaseThermometer.

Parameters
[in]ippointer to BaseThermometer interface.
Returns
the number of axes.

Definition at line 386 of file hts221.c.

References HTS221_THERMO_NUMBER_OF_AXES.

◆ thermo_read_raw()

msg_t thermo_read_raw ( void * ip,
int32_t axes[] )
static

Retrieves raw data from the BaseThermometer.

Note
This data is retrieved from MEMS register without any algebraical manipulation.
The axes array must be at least the same size of the BaseThermometer axes number.
Parameters
[in]ippointer to BaseThermometer interface.
[out]axesa buffer which would be filled with raw data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.

Definition at line 408 of file hts221.c.

References HTS221_AD_TEMP_OUT_L, HTS221_READY, hts221I2CReadRegister(), I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

Referenced by thermo_read_cooked().

Here is the call graph for this function:

◆ thermo_read_cooked()

msg_t thermo_read_cooked ( void * ip,
float * axis )
static

Retrieves cooked data from the BaseThermometer.

Note
This data is manipulated according to the formula cooked = (raw * sensitivity) - bias.
Final data is expressed as °C.
The axes array must be at least the same size of the BaseThermometer axes number.
Parameters
[in]ippointer to BaseThermometer interface.
[out]axisa buffer which would be filled with cooked data.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.
MSG_RESETif one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors().
MSG_TIMEOUTif a timeout occurred before operation end.

Definition at line 462 of file hts221.c.

References HTS221_READY, objGetInstance, osalDbgAssert, osalDbgCheck, and thermo_read_raw().

Here is the call graph for this function:

◆ thermo_set_bias()

msg_t thermo_set_bias ( void * ip,
float * bp )
static

Set bias values for the BaseThermometer.

Note
Bias must be expressed as °C.
The bias buffer must be at least the same size of the BaseThermometer axes number.
Parameters
[in]ippointer to BaseThermometer interface.
[in]bpa buffer which contains biases.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.

Definition at line 494 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ thermo_reset_bias()

msg_t thermo_reset_bias ( void * ip)
static

Reset bias values for the BaseThermometer.

Note
Default biases value are obtained from device datasheet when available otherwise they are considered zero.
Parameters
[in]ippointer to BaseThermometer interface.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.

Definition at line 521 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ thermo_set_sensitivity()

msg_t thermo_set_sensitivity ( void * ip,
float * sp )
static

Set sensitivity values for the BaseThermometer.

Note
Sensitivity must be expressed as °C/LSB.
The sensitivity buffer must be at least the same size of the BaseThermometer axes number.
Parameters
[in]ippointer to BaseThermometer interface.
[in]spa buffer which contains sensitivities.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.

Definition at line 550 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ thermo_reset_sensitivity()

msg_t thermo_reset_sensitivity ( void * ip)
static

Reset sensitivity values for the BaseThermometer.

Note
Default sensitivities value are obtained from device datasheet.
Parameters
[in]ippointer to BaseThermometer interface.
Returns
The operation status.
Return values
MSG_OKif the function succeeded.

Definition at line 576 of file hts221.c.

References HTS221_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.

◆ hts221ObjectInit()

void hts221ObjectInit ( HTS221Driver * devp)

Initializes an instance.

Parameters
[out]devppointer to the HTS221Driver object
Function Class:
Object or module nitializer function.

Definition at line 622 of file hts221.c.

References HTS221_HYGRO_NUMBER_OF_AXES, HTS221_STOP, HTS221_THERMO_NUMBER_OF_AXES, HTS221Driver::hygro_if, HTS221Driver::thermo_if, BaseHygrometer::vmt, BaseThermometer::vmt, HTS221Driver::vmt, vmt_device, vmt_hygrometer, and vmt_thermometer.

◆ hts221Start()

void hts221Start ( HTS221Driver * devp,
const HTS221Config * config )

Configures and activates HTS221 Complex Driver peripheral.

Parameters
[in]devppointer to the HTS221Driver object
[in]configpointer to the HTS221Config object
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 647 of file hts221.c.

References HTS221_AD_AV_CONF, HTS221_AD_CTRL_REG1, HTS221_CTRL_REG1_PD, HTS221_READY, HTS221_STOP, hts221Calibrate(), hts221I2CWriteRegister(), i2cAcquireBus(), i2cReleaseBus(), i2cStart(), osalDbgAssert, osalDbgCheck, and osalThreadSleepMilliseconds.

Here is the call graph for this function:

◆ hts221Stop()

void hts221Stop ( HTS221Driver * devp)

Deactivates the HTS221 Complex Driver peripheral.

Parameters
[in]devppointer to the HTS221Driver object
Function Class:
Normal API, this function can be invoked by regular system threads but not from within a lock zone.

Definition at line 755 of file hts221.c.

References HTS221_AD_CTRL_REG1, HTS221_READY, HTS221_STOP, hts221I2CWriteRegister(), i2cAcquireBus(), i2cReleaseBus(), i2cStart(), i2cStop(), osalDbgAssert, and osalDbgCheck.

Here is the call graph for this function:

Variable Documentation

◆ vmt_device

const struct HTS221VMT vmt_device
static
Initial value:
= {
(size_t)0
}

Definition at line 593 of file hts221.c.

◆ vmt_hygrometer

const struct BaseHygrometerVMT vmt_hygrometer
static
Initial value:
= {
sizeof(struct HTS221VMT*),
}
static msg_t hygro_set_bias(void *ip, float *bp)
Set bias values for the BaseHygrometer.
Definition hts221.c:284
static msg_t hygro_reset_bias(void *ip)
Reset bias values for the BaseHygrometer.
Definition hts221.c:310
static msg_t hygro_reset_sensitivity(void *ip)
Reset sensitivity values for the BaseHygrometer.
Definition hts221.c:363
static msg_t hygro_read_raw(void *ip, int32_t axes[])
Retrieves raw data from the BaseHygrometer.
Definition hts221.c:195
static size_t hygro_get_axes_number(void *ip)
Return the number of axes of the BaseHygrometer.
Definition hts221.c:173
static msg_t hygro_set_sensitivity(void *ip, float *sp)
Set sensitivity values for the BaseHygrometer.
Definition hts221.c:338
static msg_t hygro_read_cooked(void *ip, float axes[])
Retrieves cooked data from the BaseHygrometer.
Definition hts221.c:249
HTS221 virtual methods table.
Definition hts221.h:404

Definition at line 597 of file hts221.c.

Referenced by hts221ObjectInit().

◆ vmt_thermometer

const struct BaseThermometerVMT vmt_thermometer
static
Initial value:
= {
sizeof(struct HTS221VMT*) + sizeof(BaseHygrometer),
}
static msg_t thermo_set_bias(void *ip, float *bp)
Set the thermometer bias.
Definition bmp085.c:586
static msg_t thermo_read_raw(void *ip, int32_t axes[])
Read thermometer raw data.
Definition bmp085.c:433
static size_t thermo_get_axes_number(void *ip)
Get the thermometer number of axes.
Definition bmp085.c:370
static msg_t thermo_read_cooked(void *ip, float axes[])
Read thermometer cooked data.
Definition bmp085.c:520
static msg_t thermo_reset_bias(void *ip)
Reset the thermometer bias.
Definition bmp085.c:619
static msg_t thermo_reset_sensitivity(void *ip)
Reset sensitivity values for the BaseThermometer.
Definition hts221.c:576
static msg_t thermo_set_sensitivity(void *ip, float *sp)
Set sensitivity values for the BaseThermometer.
Definition hts221.c:550
Base hygrometer class.

Definition at line 604 of file hts221.c.

Referenced by hts221ObjectInit(), lps22hbObjectInit(), and lps25hObjectInit().