Files

20 lines
374 B
C

#pragma once
#include <limits.h>
#include <stdint.h>
typedef enum {
DHT22_OK = INT_MAX - 8,
DHT22_TIMEOUT_ERROR,
DHT22_TIMING_ERROR,
DHT22_CHECKSUM_ERROR,
} dht22_error;
typedef uint16_t deci_percent;
typedef int16_t deci_degrees_c;
void dht22_handle_error();
deci_percent dht22_relative_humidity();
deci_degrees_c dht22_temperature();
dht22_error dht22_read();