Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
27
extern
"C"
{
28
#endif
29
34
#ifndef SHT1X_PARAM_CLK
35
#define SHT1X_PARAM_CLK (GPIO_PIN(1, 25))
36
#endif
37
#ifndef SHT1X_PARAM_DATA
38
#define SHT1X_PARAM_DATA (GPIO_PIN(1, 26))
39
#endif
40
#ifndef SHT1X_PARAM_VDD
41
#define SHT1X_PARAM_VDD (SHT1X_VDD_3_5V)
42
#endif
43
#ifndef SHT1X_PARAMS
44
#define SHT1X_PARAMS { .clk = SHT1X_PARAM_CLK, \
45
.data = SHT1X_PARAM_DATA, \
46
.vdd = SHT1X_PARAM_VDD }
47
#endif
48
54
#ifndef SHT1X_SAULINFO
55
#ifdef MODULE_SHT15
56
#define SHT1X_SAULINFO { .name = "SHT15 temperature" }, \
57
{ .name = "SHT15 humidity" }
58
#else
59
#ifdef MODULE_SHT10
60
#define SHT1X_SAULINFO { .name = "SHT10 temperature" }, \
61
{ .name = "SHT10 humidity" }
62
#else
63
/* SHT11 is the most commonly used, so use that as default */
64
#define SHT1X_SAULINFO { .name = "SHT11 temperature" }, \
65
{ .name = "SHT11 humidity" }
66
#endif
/* MODULE_SHT10 */
67
#endif
/* MODULE_SHT15 */
68
#endif
/* SHT1X_SAULINFO */
69
75
static
const
sht1x_params_t
sht1x_params
[] =
76
{
77
SHT1X_PARAMS
78
};
79
83
static
const
saul_reg_info_t
sht1x_saul_info
[] =
84
{
85
SHT1X_SAULINFO
86
};
87
88
#ifdef __cplusplus
89
}
90
#endif
91
92
#endif
/* SHT1X_PARAMS_H */
93
sht1x.h
SHT10/SHT11/SHT15 Device Driver.
saul_reg_info_t
Additional data to collect for each entry.
Definition:
saul_reg.h:49
sht1x_params_t
Parameters required to set up the SHT10/11/15 device driver.
Definition:
sht1x.h:75
sht1x_params
static const sht1x_params_t sht1x_params[]
Configure SHT1X devices.
Definition:
sht1x_params.h:75
sht1x_saul_info
static const saul_reg_info_t sht1x_saul_info[]
Allocate and configure entries to the SAUL registry.
Definition:
sht1x_params.h:83
saul_reg.h
SAUL registry interface definition.
Generated on Tue Nov 24 2020 19:46:51 by
1.8.17