Loading...
Searching...
No Matches
sht1x_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Otto-von-Guericke-Universität Magdeburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "sht1x.h"
20#include "saul_reg.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef SHT1X_PARAM_CLK
34#define SHT1X_PARAM_CLK (GPIO_PIN(1, 25))
35#endif
36#ifndef SHT1X_PARAM_DATA
40#define SHT1X_PARAM_DATA (GPIO_PIN(1, 26))
41#endif
42#ifndef SHT1X_PARAM_VDD
48#define SHT1X_PARAM_VDD (SHT1X_VDD_3_5V)
49#endif
50#ifndef SHT1X_PARAMS
54#define SHT1X_PARAMS { .clk = SHT1X_PARAM_CLK, \
55 .data = SHT1X_PARAM_DATA, \
56 .vdd = SHT1X_PARAM_VDD }
57#endif
59
64#ifndef SHT1X_SAULINFO
65#ifdef MODULE_SHT15
66#define SHT1X_SAULINFO { .name = "SHT15 temperature" }, \
67 { .name = "SHT15 humidity" }
68#else
69#ifdef MODULE_SHT10
70#define SHT1X_SAULINFO { .name = "SHT10 temperature" }, \
71 { .name = "SHT10 humidity" }
72#else
73/* SHT11 is the most commonly used, so use that as default */
74#define SHT1X_SAULINFO { .name = "SHT11 temperature" }, \
75 { .name = "SHT11 humidity" }
76#endif /* MODULE_SHT10 */
77#endif /* MODULE_SHT15 */
78#endif /* SHT1X_SAULINFO */
79
81
86{
88};
89
94{
95 SHT1X_SAULINFO
96};
97
98#ifdef __cplusplus
99}
100#endif
101
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:48
Parameters required to set up the SHT10/11/15 device driver.
Definition sht1x.h:74