sht3x_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Gunar Schorcht
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
17 #ifndef SHT3X_PARAMS_H
18 #define SHT3X_PARAMS_H
19 
20 #include "board.h"
21 #include "sht3x.h"
22 #include "saul_reg.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #ifndef SHT3X_PARAM_I2C_DEV
33 #define SHT3X_PARAM_I2C_DEV (I2C_DEV(0))
34 #endif
35 #ifndef SHT3X_PARAM_I2C_ADDR
36 #define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_2)
37 #endif
38 #ifndef SHT3X_PARAM_MODE
39 #define SHT3X_PARAM_MODE (SHT3X_PERIODIC_2_MPS)
40 #endif
41 #ifndef SHT3X_PARAM_REPEAT
42 #define SHT3X_PARAM_REPEAT (SHT3X_HIGH)
43 #endif
44 
45 #ifndef SHT3X_PARAMS
46 #define SHT3X_PARAMS { .i2c_dev = SHT3X_PARAM_I2C_DEV, \
47  .i2c_addr = SHT3X_PARAM_I2C_ADDR, \
48  .mode = SHT3X_PARAM_MODE, \
49  .repeat = SHT3X_PARAM_REPEAT \
50  }
51 #endif
52 
53 #ifndef SHT3X_SAUL_INFO
54 #define SHT3X_SAUL_INFO { .name = "sht3x1" }
55 #endif
56 
61 static const sht3x_params_t sht3x_params[] =
62 {
63  SHT3X_PARAMS
64 };
65 
70 {
71  SHT3X_SAUL_INFO
72 };
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* SHT3X_PARAMS_H */
79 
sht3x_saul_info
static const saul_reg_info_t sht3x_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: sht3x_params.h:69
sht3x_params
static const sht3x_params_t sht3x_params[]
SHT3x configuration.
Definition: sht3x_params.h:61
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
sht3x.h
Device Driver for Sensirion SHT30/SHT31/SHT35 Humidity and Temperature Sensors.
saul_reg.h
SAUL registry interface definition.
sht3x_params_t
SHT3x device initialization parameters.
Definition: sht3x.h:85