From d24cdd7cdeeee87c453235a6a1be3285bc390f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Nohlg=C3=A5rd?= Date: Sat, 3 Oct 2015 22:52:33 +0200 Subject: [PATCH] cpu/native: Update timer_init to match API changes --- cpu/native/periph/timer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cpu/native/periph/timer.c b/cpu/native/periph/timer.c index c31ae52243..7afd9b5064 100644 --- a/cpu/native/periph/timer.c +++ b/cpu/native/periph/timer.c @@ -74,13 +74,16 @@ void native_isr_timer(void) _callback(0); } -int timer_init(tim_t dev, unsigned int ticks_per_us, void (*callback)(int)) +int timer_init(tim_t dev, unsigned long freq, void (*callback)(int)) { - (void)ticks_per_us; + (void)freq; DEBUG("%s\n", __func__); if (dev >= TIMER_NUMOF) { return -1; } + if (freq != NATIVE_TIMER_SPEED) { + return -1; + } /* initialize time delta */ time_null = 0;