Contiki-NG
arch
dev
sensor
dht11
dht11-sensor.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021 Yago Fontoura do Rosario <yago.rosario@hotmail.com.br>
3
* All rights reserved.
4
*
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
7
* are met:
8
* 1. Redistributions of source code must retain the above copyright
9
* notice, this list of conditions and the following disclaimer.
10
* 2. Redistributions in binary form must reproduce the above copyright
11
* notice, this list of conditions and the following disclaimer in the
12
* documentation and/or other materials provided with the distribution.
13
*
14
* 3. Neither the name of the copyright holder nor the names of its
15
* contributors may be used to endorse or promote products derived
16
* from this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29
* OF THE POSSIBILITY OF SUCH DAMAGE.
30
*/
31
/*---------------------------------------------------------------------------*/
32
33
/**
34
* \file
35
* DHT 11 sensor header file
36
* \author
37
* Yago Fontoura do Rosario <yago.rosario@hotmail.com.br
38
*/
39
40
/**
41
* \addtogroup dht11-sensor
42
* @{
43
*
44
* DHT 11 Sensor
45
*/
46
47
#ifndef DHT11_SENSOR_H_
48
#define DHT11_SENSOR_H_
49
50
#include "sensors.h"
51
52
extern
const
struct
sensors_sensor dht11_sensor;
53
54
/**
55
* @brief DHT11 Configuration type for GPIO Port
56
*
57
*/
58
#define DHT11_CONFIGURE_GPIO_PORT (0)
59
60
/**
61
* @brief DHT11 Configuration type for GPIO Pin
62
*
63
*/
64
#define DHT11_CONFIGURE_GPIO_PIN (1)
65
66
/**
67
* @brief DHT11 value type for humidity integer part
68
*
69
*/
70
#define DHT11_VALUE_HUMIDITY_INTEGER (0)
71
72
/**
73
* @brief DHT11 value type for humidity decimal part
74
*
75
*/
76
#define DHT11_VALUE_HUMIDITY_DECIMAL (1)
77
78
/**
79
* @brief DHT11 value type for temperature integer part
80
*
81
*/
82
#define DHT11_VALUE_TEMPERATURE_INTEGER (2)
83
84
/**
85
* @brief DHT11 value type for temperature decimal part
86
*
87
*/
88
#define DHT11_VALUE_TEMPERATURE_DECIMAL (3)
89
90
/**
91
* @brief DHT11 status okay
92
*
93
*/
94
#define DHT11_STATUS_OKAY (0)
95
96
/**
97
* @brief DHT11 status timeout
98
*
99
*/
100
#define DHT11_STATUS_TIMEOUT (1)
101
102
/**
103
* @brief DHT11 status checksum failed
104
*
105
*/
106
#define DHT11_STATUS_CHECKSUM_FAILED (2)
107
108
#endif
/* DHT11_SENSOR_H_ */
109
110
/** @} */
Generated on Tue Jul 13 2021 15:12:11 for Contiki-NG by
1.8.13