Skip to content
Snippets Groups Projects
Commit 75720c70 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

tests: driver_dht: switch to xtimer

parent 01b8c578
No related branches found
No related tags found
No related merge requests found
...@@ -9,6 +9,7 @@ ifneq (,$(filter stm32f4discovery,$(BOARD))) ...@@ -9,6 +9,7 @@ ifneq (,$(filter stm32f4discovery,$(BOARD)))
endif endif
USEMODULE += dht USEMODULE += dht
USEMODULE += xtimer
ifneq (,$(DHT_TYPE)) ifneq (,$(DHT_TYPE))
CFLAGS += -DDHT_TYPE=$(DHT_TYPE) CFLAGS += -DDHT_TYPE=$(DHT_TYPE)
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include <stdio.h> #include <stdio.h>
#include "hwtimer.h" #include "xtimer.h"
#include "timex.h"
#include "dht.h" #include "dht.h"
...@@ -59,7 +58,7 @@ int main(void) ...@@ -59,7 +58,7 @@ int main(void)
dht_parse(&dev, &data, &hum, &temp); dht_parse(&dev, &data, &hum, &temp);
printf("raw relative humidity: %i\nraw temperature: %i C\n", data.humidity, data.temperature); printf("raw relative humidity: %i\nraw temperature: %i C\n", data.humidity, data.temperature);
printf("relative humidity: %i\ntemperature: %i C\n", (int) hum, (int) temp); printf("relative humidity: %i\ntemperature: %i C\n", (int) hum, (int) temp);
hwtimer_wait(HWTIMER_TICKS(2000 * MS_IN_USEC)); xtimer_usleep(2000 * MS_IN_USEC);
} }
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment