diff --git a/Makefile.dep b/Makefile.dep index c04601c886..378d1fed07 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -345,3 +345,7 @@ endif ifneq (,$(filter dht,$(USEMODULE))) USEMODULE += xtimer endif + +ifneq (,$(filter lm75a,$(USEMODULE))) + USEMODULE += xtimer +endif diff --git a/drivers/lm75a/lm75a-temp-sensor.c b/drivers/lm75a/lm75a-temp-sensor.c index 3029d10b78..015e39e8f7 100644 --- a/drivers/lm75a/lm75a-temp-sensor.c +++ b/drivers/lm75a/lm75a-temp-sensor.c @@ -31,14 +31,12 @@ #include #include "msg.h" #include "thread.h" -#include "vtimer.h" -#include "timex.h" #include "lpc2387.h" #include "gpioint.h" #include "i2c.h" #include "lm75a-temp-sensor.h" -#include "hwtimer.h" #include "board.h" +#include "xtimer.h" //declaration as volatile is important, otherwise no interrupt is triggered. volatile bool my_alarm = false; @@ -310,8 +308,8 @@ void lm75A_start_sensor_sampling(void (*handler)(void)) handler(); my_alarm = false; } - hwtimer_wait(HWTIMER_TICKS(100000)); + xtimer_usleep(100000); LED_RED_TOGGLE; - hwtimer_wait(HWTIMER_TICKS(100000)); + xtimer_usleep(100000); } }