sht1x_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Otto-von-Guericke-Universität Magdeburg
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 
9 #pragma once
10 
21 #include "board.h"
22 #include "sht1x.h"
23 #include "saul_reg.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef SHT1X_PARAM_CLK
37 #define SHT1X_PARAM_CLK (GPIO_PIN(1, 25))
38 #endif
39 #ifndef SHT1X_PARAM_DATA
43 #define SHT1X_PARAM_DATA (GPIO_PIN(1, 26))
44 #endif
45 #ifndef SHT1X_PARAM_VDD
51 #define SHT1X_PARAM_VDD (SHT1X_VDD_3_5V)
52 #endif
53 #ifndef SHT1X_PARAMS
57 #define SHT1X_PARAMS { .clk = SHT1X_PARAM_CLK, \
58  .data = SHT1X_PARAM_DATA, \
59  .vdd = SHT1X_PARAM_VDD }
60 #endif
67 #ifndef SHT1X_SAULINFO
68 #ifdef MODULE_SHT15
69 #define SHT1X_SAULINFO { .name = "SHT15 temperature" }, \
70  { .name = "SHT15 humidity" }
71 #else
72 #ifdef MODULE_SHT10
73 #define SHT1X_SAULINFO { .name = "SHT10 temperature" }, \
74  { .name = "SHT10 humidity" }
75 #else
76 /* SHT11 is the most commonly used, so use that as default */
77 #define SHT1X_SAULINFO { .name = "SHT11 temperature" }, \
78  { .name = "SHT11 humidity" }
79 #endif /* MODULE_SHT10 */
80 #endif /* MODULE_SHT15 */
81 #endif /* SHT1X_SAULINFO */
82 
88 static const sht1x_params_t sht1x_params[] =
89 {
91 };
92 
97 {
98  SHT1X_SAULINFO
99 };
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
SAUL registry interface definition.
SHT10/SHT11/SHT15 Device Driver.
static const saul_reg_info_t sht1x_saul_info[]
Allocate and configure entries to the SAUL registry.
Definition: sht1x_params.h:96
static const sht1x_params_t sht1x_params[]
Configure SHT1X devices.
Definition: sht1x_params.h:88
#define SHT1X_PARAMS
The initialization parameters for the SHT1x driver.
Definition: sht1x_params.h:57
Additional data to collect for each entry.
Definition: saul_reg.h:48
Parameters required to set up the SHT10/11/15 device driver.
Definition: sht1x.h:74