I didn't quite realise I needed to #include sdkconfig.h I thought they were injected as -D flags for ... no reason really
17 lines
287 B
C
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;
|
|
}
|