sensor_dht11.h
Go to the documentation of this file.
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
extern volatile bool sensor_dht11_measurement_received;
struct sensor_dht11_measurement_t {
uint8_t humidity;
uint8_t temperature;
};
void sensor_dht11_setup(void);
bool sensor_dht11_measurement_request(void);
struct sensor_dht11_measurement_t sensor_dht11_measurement_decode(void);
sensor_dht11_measurement_decode
struct sensor_dht11_measurement_t sensor_dht11_measurement_decode(void)
decode received measurement
Definition: sensor_dht11.c:122
sensor_dht11_measurement_request
bool sensor_dht11_measurement_request(void)
request measurement from sensor
Definition: sensor_dht11.c:100
sensor_dht11_setup
void sensor_dht11_setup(void)
setup peripherals to communicate with sensor
Definition: sensor_dht11.c:75
sensor_dht11_measurement_received
volatile bool sensor_dht11_measurement_received
a measurement response has been received
Definition: sensor_dht11.c:44
sensor_dht11_measurement_t
measurement returned by sensor
Definition: sensor_dht11.h:27
sensor_dht11_measurement_t::humidity
uint8_t humidity
relative humidity in RH (20-95)
Definition: sensor_dht11.h:28
sensor_dht11_measurement_t::temperature
uint8_t temperature
temperature in °C (0-50)
Definition: sensor_dht11.h:29