Contiki-NG
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  * \addtogroup dev
35  * @{
36  *
37  * \defgroup dht11-sensor DHT 11 Sensor driver
38  * @{
39  *
40  * \file
41  * DHT 11 sensor header file
42  * \author
43  * Yago Fontoura do Rosario <yago.rosario@hotmail.com.br
44  */
45 
46 #ifndef DHT11_SENSOR_H_
47 #define DHT11_SENSOR_H_
48 
49 #include "sensors.h"
50 
51 extern const struct sensors_sensor dht11_sensor;
52 
53 /**
54  * @brief DHT11 Configuration type for GPIO Port
55  *
56  */
57 #define DHT11_CONFIGURE_GPIO_PORT (0)
58 
59 /**
60  * @brief DHT11 Configuration type for GPIO Pin
61  *
62  */
63 #define DHT11_CONFIGURE_GPIO_PIN (1)
64 
65 /**
66  * @brief DHT11 value type for humidity integer part
67  *
68  */
69 #define DHT11_VALUE_HUMIDITY_INTEGER (0)
70 
71 /**
72  * @brief DHT11 value type for humidity decimal part
73  *
74  */
75 #define DHT11_VALUE_HUMIDITY_DECIMAL (1)
76 
77 /**
78  * @brief DHT11 value type for temperature integer part
79  *
80  */
81 #define DHT11_VALUE_TEMPERATURE_INTEGER (2)
82 
83 /**
84  * @brief DHT11 value type for temperature decimal part
85  *
86  */
87 #define DHT11_VALUE_TEMPERATURE_DECIMAL (3)
88 
89 /**
90  * @brief DHT11 status okay
91  *
92  */
93 #define DHT11_STATUS_OKAY (0)
94 
95 /**
96  * @brief DHT11 status timeout
97  *
98  */
99 #define DHT11_STATUS_TIMEOUT (1)
100 
101 /**
102  * @brief DHT11 status checksum failed
103  *
104  */
105 #define DHT11_STATUS_CHECKSUM_FAILED (2)
106 
107 #endif /* DHT11_SENSOR_H_ */
108 
109 /**
110  * @}
111  * @}
112  */