1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests: driver_dht: switch to xtimer

This commit is contained in:
Kaspar Schleiser 2015-09-03 18:53:45 +02:00
parent 01b8c57882
commit 75720c70ae
2 changed files with 3 additions and 3 deletions

View File

@ -9,6 +9,7 @@ ifneq (,$(filter stm32f4discovery,$(BOARD)))
endif
USEMODULE += dht
USEMODULE += xtimer
ifneq (,$(DHT_TYPE))
CFLAGS += -DDHT_TYPE=$(DHT_TYPE)

View File

@ -29,8 +29,7 @@
#include <stdio.h>
#include "hwtimer.h"
#include "timex.h"
#include "xtimer.h"
#include "dht.h"
@ -59,7 +58,7 @@ int main(void)
dht_parse(&dev, &data, &hum, &temp);
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);
hwtimer_wait(HWTIMER_TICKS(2000 * MS_IN_USEC));
xtimer_usleep(2000 * MS_IN_USEC);
}
return 0;