Skip to content
Snippets Groups Projects
Commit e9301e23 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

drivers: ltc4150: use xtimer

parent 4bbc5ae4
No related branches found
No related tags found
No related merge requests found
...@@ -370,3 +370,7 @@ endif ...@@ -370,3 +370,7 @@ endif
ifneq (,$(filter nvram_spi,$(USEMODULE))) ifneq (,$(filter nvram_spi,$(USEMODULE)))
USEMODULE += xtimer USEMODULE += xtimer
endif endif
ifneq (,$(filter ltc4150,$(USEMODULE)))
USEMODULE += xtimer
endif
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* @author Kaspar Schleiser <kaspar@schleiser.de> * @author Kaspar Schleiser <kaspar@schleiser.de>
*/ */
#include <hwtimer.h> #include <xtimer.h>
#include "ltc4150_arch.h" #include "ltc4150_arch.h"
static volatile unsigned long int_count; static volatile unsigned long int_count;
...@@ -86,7 +86,7 @@ void ltc4150_start(void) ...@@ -86,7 +86,7 @@ void ltc4150_start(void)
{ {
ltc4150_disable_int(); ltc4150_disable_int();
int_count = 0; int_count = 0;
uint32_t now = hwtimer_now(); uint32_t now = xtimer_now();
ltc4150_sync_blocking(); ltc4150_sync_blocking();
start_time = now; start_time = now;
last_int_time = now; last_int_time = now;
...@@ -100,7 +100,7 @@ void ltc4150_stop(void) ...@@ -100,7 +100,7 @@ void ltc4150_stop(void)
void __attribute__((__no_instrument_function__)) ltc4150_interrupt(void) void __attribute__((__no_instrument_function__)) ltc4150_interrupt(void)
{ {
uint32_t now = hwtimer_now(); uint32_t now = xtimer_now();
if (now >= last_int_time) { if (now >= last_int_time) {
last_int_duration = now - last_int_time; last_int_duration = now - last_int_time;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment