From cd715fedf6a50a5bcbcb7fc05fbbed46c1734bae Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 29 Jul 2015 18:02:20 +0200 Subject: [PATCH] sys: compat: remove hwtimer_compat --- sys/Makefile | 3 -- sys/compat/hwtimer/Makefile | 3 -- sys/compat/hwtimer/hwtimer_arch.c | 77 ------------------------------- 3 files changed, 83 deletions(-) delete mode 100644 sys/compat/hwtimer/Makefile delete mode 100644 sys/compat/hwtimer/hwtimer_arch.c diff --git a/sys/Makefile b/sys/Makefile index d133ab8fc..2d4a65930 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -52,9 +52,6 @@ endif ifneq (,$(filter sixlowpan,$(USEMODULE))) DIRS += net/network_layer/sixlowpan endif -ifneq (,$(filter hwtimer_compat,$(USEMODULE))) - DIRS += compat/hwtimer -endif ifneq (,$(filter log_%,$(USEMODULE))) DIRS += log endif diff --git a/sys/compat/hwtimer/Makefile b/sys/compat/hwtimer/Makefile deleted file mode 100644 index 316bf04d4..000000000 --- a/sys/compat/hwtimer/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -MODULE = hwtimer_compat - -include $(RIOTBASE)/Makefile.base diff --git a/sys/compat/hwtimer/hwtimer_arch.c b/sys/compat/hwtimer/hwtimer_arch.c deleted file mode 100644 index 8eca632fe..000000000 --- a/sys/compat/hwtimer/hwtimer_arch.c +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2015 Kaspar Schleiser - * 2014 Freie Universität Berlin - * - * - * This file is subject to the terms and conditions of the GNU Lesser - * General Public License v2.1. See the file LICENSE in the top level - * directory for more details. - */ - -/** - * @ingroup sys_compat - * @{ - * - * @file - * @brief Implementation of the kernels hwtimer interface over periph timers - * - * This hwtimer implementation wraps one periph timer - * - * @author Thomas Eichinger - * @author Kaspar Schleiser - * - * @} - */ - -#include "arch/hwtimer_arch.h" -#include "board.h" -#include "periph/timer.h" -#include "thread.h" - - -void irq_handler(int channel); -void (*timeout_handler)(int); - - -void hwtimer_arch_init(void (*handler)(int), uint32_t fcpu) -{ - (void) fcpu; - - timeout_handler = handler; - timer_init(HW_TIMER, 1, &irq_handler); -} - -void hwtimer_arch_enable_interrupt(void) -{ - timer_irq_enable(HW_TIMER); -} - -void hwtimer_arch_disable_interrupt(void) -{ - timer_irq_disable(HW_TIMER); -} - -void hwtimer_arch_set(unsigned long offset, short timer) -{ - timer_set(HW_TIMER, timer, offset); -} - -void hwtimer_arch_set_absolute(unsigned long value, short timer) -{ - timer_set_absolute(HW_TIMER, timer, value); -} - -void hwtimer_arch_unset(short timer) -{ - timer_clear(HW_TIMER, timer); -} - -unsigned long hwtimer_arch_now(void) -{ - return timer_read(HW_TIMER); -} - -void irq_handler(int channel) -{ - timeout_handler((short)(channel)); -}