30#define SHT3X_I2C_ADDR_1 (0x44)
31#define SHT3X_I2C_ADDR_2 (0x45)
uint_fast8_t i2c_t
Default i2c_t type definition.
Low-level I2C peripheral driver interface definition.
int sht3x_read(sht3x_dev_t *dev, int16_t *temp, int16_t *hum)
Read SHT3x measurement results (temperature and humidity)
sht3x_mode_t
SHT3x measurement modes.
@ SHT3X_PERIODIC_2_MPS
periodic with 2 measurements per second (mps)
@ SHT3X_PERIODIC_4_MPS
periodic with 4 measurements per second (mps)
@ SHT3X_SINGLE_SHOT
single shot measurement
@ SHT3X_PERIODIC_1_MPS
periodic with 1 measurements per second (mps)
@ SHT3X_PERIODIC_10_MPS
periodic with 10 measurements per second (mps)
@ SHT3X_PERIODIC_0_5_MPS
periodic with 0.5 measurements per second (mps)
sht3x_error_codes
Driver error codes (returned as negative values)
@ SHT3X_ERROR_STATUS
sensor has wrong status
@ SHT3X_ERROR_I2C
I2C communication failure.
@ SHT3X_ERROR_MEASURE_CMD_INV
measurement command not executed
@ SHT3X_ERROR_CRC
CRC check failed.
sht3x_repeat_t
SHT3x repeatability levels.
@ SHT3X_LOW
low repeatability
@ SHT3X_HIGH
high repeatability
@ SHT3X_MEDIUM
medium repeatability
int sht3x_init(sht3x_dev_t *dev, const sht3x_params_t *params)
Initialize the SHT3x sensor device.
SHT3x sensor device data structure.
uint8_t i2c_addr
I2C address.
uint32_t meas_duration
time in us until the results of the current measurement become available
sht3x_repeat_t repeat
repeatability level used
bool meas_started
indicates whether measurement is started
uint32_t meas_start_time
start time of current measurement in us
sht3x_mode_t mode
measurement mode used
SHT3x device initialization parameters.
uint8_t i2c_addr
I2C address
sht3x_repeat_t repeat
repeatability level used
sht3x_mode_t mode
measurement mode used