Browse Source

drivers: lm75: switch to xtimer

dev/timer
Kaspar Schleiser 8 years ago
parent
commit
94c5512751
  1. 4
      Makefile.dep
  2. 8
      drivers/lm75a/lm75a-temp-sensor.c

4
Makefile.dep

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

8
drivers/lm75a/lm75a-temp-sensor.c

@ -31,14 +31,12 @@
#include <math.h>
#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);
}
}

Loading…
Cancel
Save