1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers: lm75: switch to xtimer

This commit is contained in:
Kaspar Schleiser 2015-08-14 10:18:16 +02:00
parent 39533eb28c
commit 94c5512751
2 changed files with 7 additions and 5 deletions

View File

@ -345,3 +345,7 @@ endif
ifneq (,$(filter dht,$(USEMODULE))) ifneq (,$(filter dht,$(USEMODULE)))
USEMODULE += xtimer USEMODULE += xtimer
endif endif
ifneq (,$(filter lm75a,$(USEMODULE)))
USEMODULE += xtimer
endif

View File

@ -31,14 +31,12 @@
#include <math.h> #include <math.h>
#include "msg.h" #include "msg.h"
#include "thread.h" #include "thread.h"
#include "vtimer.h"
#include "timex.h"
#include "lpc2387.h" #include "lpc2387.h"
#include "gpioint.h" #include "gpioint.h"
#include "i2c.h" #include "i2c.h"
#include "lm75a-temp-sensor.h" #include "lm75a-temp-sensor.h"
#include "hwtimer.h"
#include "board.h" #include "board.h"
#include "xtimer.h"
//declaration as volatile is important, otherwise no interrupt is triggered. //declaration as volatile is important, otherwise no interrupt is triggered.
volatile bool my_alarm = false; volatile bool my_alarm = false;
@ -310,8 +308,8 @@ void lm75A_start_sensor_sampling(void (*handler)(void))
handler(); handler();
my_alarm = false; my_alarm = false;
} }
hwtimer_wait(HWTIMER_TICKS(100000)); xtimer_usleep(100000);
LED_RED_TOGGLE; LED_RED_TOGGLE;
hwtimer_wait(HWTIMER_TICKS(100000)); xtimer_usleep(100000);
} }
} }