diff --git a/Makefile.dep b/Makefile.dep index 51d867b6b05e6c947bcbecd570f3579303c2e5f5..1a4938fced95cc0551df98b2d2b8ce30b77e770b 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -370,3 +370,7 @@ endif ifneq (,$(filter nvram_spi,$(USEMODULE))) USEMODULE += xtimer endif + +ifneq (,$(filter ltc4150,$(USEMODULE))) + USEMODULE += xtimer +endif diff --git a/drivers/ltc4150/ltc4150.c b/drivers/ltc4150/ltc4150.c index a9815f0a2e89a5f1d017409c6a6faacf470fac28..cf9f82e517c84775b4f657a0e5d491ba407f8abd 100644 --- a/drivers/ltc4150/ltc4150.c +++ b/drivers/ltc4150/ltc4150.c @@ -19,7 +19,7 @@ * @author Kaspar Schleiser <kaspar@schleiser.de> */ -#include <hwtimer.h> +#include <xtimer.h> #include "ltc4150_arch.h" static volatile unsigned long int_count; @@ -86,7 +86,7 @@ void ltc4150_start(void) { ltc4150_disable_int(); int_count = 0; - uint32_t now = hwtimer_now(); + uint32_t now = xtimer_now(); ltc4150_sync_blocking(); start_time = now; last_int_time = now; @@ -100,7 +100,7 @@ void ltc4150_stop(void) void __attribute__((__no_instrument_function__)) ltc4150_interrupt(void) { - uint32_t now = hwtimer_now(); + uint32_t now = xtimer_now(); if (now >= last_int_time) { last_int_duration = now - last_int_time;