From 0b9f03f442b5c3bc255cceab2b2f98983a0fe5c8 Mon Sep 17 00:00:00 2001 From: Antonio Iannopollo Date: Wed, 9 May 2018 19:29:24 -0700 Subject: [PATCH] fixed dht22 driver --- arch/platform/zoul/dev/dht22.c | 4 ++-- arch/platform/zoul/dev/dht22.h | 2 +- examples/platform-specific/zoul/test-dht22.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/platform/zoul/dev/dht22.c b/arch/platform/zoul/dev/dht22.c index 0e826bfbf..e5d14d53b 100644 --- a/arch/platform/zoul/dev/dht22.c +++ b/arch/platform/zoul/dev/dht22.c @@ -207,8 +207,8 @@ value(int type) } } /*---------------------------------------------------------------------------*/ -int -dht22_read_all(int *temperature, int *humidity) +int16_t +dht22_read_all(int16_t *temperature, int16_t *humidity) { if((temperature == NULL) || (humidity == NULL)) { PRINTF("DHT22: Invalid arguments\n"); diff --git a/arch/platform/zoul/dev/dht22.h b/arch/platform/zoul/dev/dht22.h index 10adee5c3..ecd02a26e 100644 --- a/arch/platform/zoul/dev/dht22.h +++ b/arch/platform/zoul/dev/dht22.h @@ -99,7 +99,7 @@ * \name DHT22 auxiliary functions * @{ */ -int dht22_read_all(int *temperature, int *humidity); +int16_t dht22_read_all(int16_t *temperature, int16_t *humidity); /** @} */ /* -------------------------------------------------------------------------- */ #define DHT22_SENSOR "DHT22 sensor" diff --git a/examples/platform-specific/zoul/test-dht22.c b/examples/platform-specific/zoul/test-dht22.c index f1a49b516..43048eba3 100644 --- a/examples/platform-specific/zoul/test-dht22.c +++ b/examples/platform-specific/zoul/test-dht22.c @@ -55,7 +55,7 @@ static struct etimer et; /*---------------------------------------------------------------------------*/ PROCESS_THREAD(remote_dht22_process, ev, data) { - int temperature, humidity; + int16_t temperature, humidity; PROCESS_BEGIN(); SENSORS_ACTIVATE(dht22);