Loading...
Searching...
No Matches
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
19#ifndef SHT1X_PARAMS_H
20#define SHT1X_PARAMS_H
21
22#include "board.h"
23#include "sht1x.h"
24#include "saul_reg.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef SHT1X_PARAM_CLK
38#define SHT1X_PARAM_CLK (GPIO_PIN(1, 25))
39#endif
40#ifndef SHT1X_PARAM_DATA
44#define SHT1X_PARAM_DATA (GPIO_PIN(1, 26))
45#endif
46#ifndef SHT1X_PARAM_VDD
52#define SHT1X_PARAM_VDD (SHT1X_VDD_3_5V)
53#endif
54#ifndef SHT1X_PARAMS
58#define SHT1X_PARAMS { .clk = SHT1X_PARAM_CLK, \
59 .data = SHT1X_PARAM_DATA, \
60 .vdd = SHT1X_PARAM_VDD }
61#endif
68#ifndef SHT1X_SAULINFO
69#ifdef MODULE_SHT15
70#define SHT1X_SAULINFO { .name = "SHT15 temperature" }, \
71 { .name = "SHT15 humidity" }
72#else
73#ifdef MODULE_SHT10
74#define SHT1X_SAULINFO { .name = "SHT10 temperature" }, \
75 { .name = "SHT10 humidity" }
76#else
77/* SHT11 is the most commonly used, so use that as default */
78#define SHT1X_SAULINFO { .name = "SHT11 temperature" }, \
79 { .name = "SHT11 humidity" }
80#endif /* MODULE_SHT10 */
81#endif /* MODULE_SHT15 */
82#endif /* SHT1X_SAULINFO */
83
90{
92};
93
98{
99 SHT1X_SAULINFO
100};
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif /* SHT1X_PARAMS_H */
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.
static const sht1x_params_t sht1x_params[]
Configure SHT1X devices.
#define SHT1X_PARAMS
The initialization parameters for the SHT1x driver.
Additional data to collect for each entry.
Definition saul_reg.h:49
Parameters required to set up the SHT10/11/15 device driver.
Definition sht1x.h:75