Loading...
Searching...
No Matches

Default configuration for SHT2x humidity and temperature sensor. More...

Detailed Description

Default configuration for SHT2x humidity and temperature sensor.

Author
Kees Bakker kees@.nosp@m.soda.nosp@m.q.com
George Psimenos gp7g1.nosp@m.4@so.nosp@m.ton.a.nosp@m.c.uk
Steffen Robertz steff.nosp@m.en.r.nosp@m.obert.nosp@m.z@rw.nosp@m.th-aa.nosp@m.chen.nosp@m..de

Definition in file sht2x_params.h.

#include "sht2x.h"
#include "saul_reg.h"
+ Include dependency graph for sht2x_params.h:

Go to the source code of this file.

Macros

#define SHT2X_NUMOF   ARRAY_SIZE(sht2x_params)
 Get the number of configured SHT2X devices.
 

Variables

static const sht2x_params_t sht2x_params []
 Configure SHT2X.
 
static const saul_reg_info_t sht2x_saul_reg_info [SHT2X_NUMOF]
 Configuration details of SAUL registry entries.
 

Default SHT2x hardware configuration

#define SHT2X_PARAM_I2C_DEV   (I2C_DEV(0))
 I2C device used.
 
#define SHT2X_PARAM_I2C_ADDR   (0x40)
 I2C slave slave of the SHT2x sensor.
 

Default sensor configuration for the SHT2x sensor

#define SHT2X_PARAM_RESOLUTION   (CONFIG_SHT2X_RESOLUTION)
 SHT2x resolution.
 
#define SHT2X_PARAM_MEASURE_MODE   (CONFIG_SHT2X_MEASURE_MODE)
 SHT2x measurement mode.
 
#define SHT2X_PARAM_CRC_MODE   (CONFIG_SHT2X_CRC_MODE)
 SHT2x CRC mode.
 
#define SHT2X_PARAMS_DEFAULT
 Default SHT2x parameter set.
 
#define SHT2X_SAUL_INFO   { .name = "sht2x" }
 Default SAUL device info.
 

Macro Definition Documentation

◆ SHT2X_NUMOF

#define SHT2X_NUMOF   ARRAY_SIZE(sht2x_params)

Get the number of configured SHT2X devices.

Definition at line 125 of file sht2x_params.h.

◆ SHT2X_PARAM_CRC_MODE

#define SHT2X_PARAM_CRC_MODE   (CONFIG_SHT2X_CRC_MODE)

SHT2x CRC mode.

Definition at line 93 of file sht2x_params.h.

◆ SHT2X_PARAM_I2C_ADDR

#define SHT2X_PARAM_I2C_ADDR   (0x40)

I2C slave slave of the SHT2x sensor.

Definition at line 73 of file sht2x_params.h.

◆ SHT2X_PARAM_I2C_DEV

#define SHT2X_PARAM_I2C_DEV   (I2C_DEV(0))

I2C device used.

Definition at line 68 of file sht2x_params.h.

◆ SHT2X_PARAM_MEASURE_MODE

#define SHT2X_PARAM_MEASURE_MODE   (CONFIG_SHT2X_MEASURE_MODE)

SHT2x measurement mode.

Definition at line 88 of file sht2x_params.h.

◆ SHT2X_PARAM_RESOLUTION

#define SHT2X_PARAM_RESOLUTION   (CONFIG_SHT2X_RESOLUTION)

SHT2x resolution.

Definition at line 83 of file sht2x_params.h.

◆ SHT2X_PARAMS_DEFAULT

#define SHT2X_PARAMS_DEFAULT
Value:
{.i2c_dev = SHT2X_PARAM_I2C_DEV, \
.i2c_addr = SHT2X_PARAM_I2C_ADDR, \
.resolution = SHT2X_PARAM_RESOLUTION, \
.measure_mode = SHT2X_PARAM_MEASURE_MODE, \
.is_crc_enabled = SHT2X_PARAM_CRC_MODE, \
}
#define SHT2X_PARAM_RESOLUTION
SHT2x resolution.
#define SHT2X_PARAM_I2C_ADDR
I2C slave slave of the SHT2x sensor.
#define SHT2X_PARAM_CRC_MODE
SHT2x CRC mode.
#define SHT2X_PARAM_I2C_DEV
I2C device used.
#define SHT2X_PARAM_MEASURE_MODE
SHT2x measurement mode.

Default SHT2x parameter set.

Definition at line 97 of file sht2x_params.h.

◆ SHT2X_SAUL_INFO

#define SHT2X_SAUL_INFO   { .name = "sht2x" }

Default SAUL device info.

Definition at line 106 of file sht2x_params.h.

Variable Documentation

◆ sht2x_params

const sht2x_params_t sht2x_params[]
static
Initial value:
=
{
}
#define SHT2X_PARAMS_DEFAULT
Default SHT2x parameter set.

Configure SHT2X.

Definition at line 113 of file sht2x_params.h.

◆ sht2x_saul_reg_info

const saul_reg_info_t sht2x_saul_reg_info[SHT2X_NUMOF]
static
Initial value:
=
{
}
#define SHT2X_SAUL_INFO
Default SAUL device info.

Configuration details of SAUL registry entries.

This array contains static details of the sensors for each device. Please be aware that the indexes are used in auto_init_sht2x, so make sure the indexes match.

Definition at line 134 of file sht2x_params.h.