Files
esp-air-monitor/components/dht22/dht22.c
Arthur Roberts c91a8fc729 Got the KConfig stuff to work
I didn't quite realise I needed to #include sdkconfig.h

I thought they were injected as -D flags for ... no reason really
2023-10-23 21:41:32 +01:00

17 lines
287 B
C

#include "dht22.h"
#include "sdkconfig.h"
#define DATA_GPIO CONFIG_DHT22_DATA_GPIO
#if DATA_GPIO == -1
#error "Please define your DHT22 GPIO Data Pin"
#endif /* CONFIG_DHT22_DATA_GPIO == -1 */
dht22_error dht_read() {
return DHT_OK;
}
int dht_temperature() {
return DATA_GPIO;
}