diff --git a/cpu/samd21/Makefile.include b/cpu/samd21/Makefile.include index 78ef97db95372019fc12ee4b33a607ab9c3760aa..96226ee5d4cfc067f6f1513888abd99bad533c19 100644 --- a/cpu/samd21/Makefile.include +++ b/cpu/samd21/Makefile.include @@ -22,7 +22,7 @@ export UNDEF += $(BINDIR)cpu/syscalls.o export UNDEF += $(BINDIR)cpu/startup.o # export the peripheral drivers to be linked into the final binary -export USEMODULE += periph +export USEMODULE += periph hwtimer_compat # CPU depends on the cortex-m common module, so include it include $(CORTEX_COMMON)Makefile.include diff --git a/sys/Makefile b/sys/Makefile index 4d2bc7642c33a8bdd2e7ea82644744f83ad527a3..515cc1314803c5eaebd080ce6c8417e0f437bc25 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -137,6 +137,9 @@ endif ifneq (,$(filter ng_udp,$(USEMODULE))) DIRS += net/transport_layer/ng_udp endif +ifneq (,$(filter hwtimer_compat,$(USEMODULE))) + DIRS += compat/hwtimer +endif DIRS += $(dir $(wildcard $(addsuffix /Makefile, ${USEMODULE}))) diff --git a/sys/compat/Makefile b/sys/compat/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..48422e909a47d7cd428d10fa73825060ccc8d8c2 --- /dev/null +++ b/sys/compat/Makefile @@ -0,0 +1 @@ +include $(RIOTBASE)/Makefile.base diff --git a/sys/compat/hwtimer/Makefile b/sys/compat/hwtimer/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..316bf04d4792f2c4bc26528a5baa2adb4b162eef --- /dev/null +++ b/sys/compat/hwtimer/Makefile @@ -0,0 +1,3 @@ +MODULE = hwtimer_compat + +include $(RIOTBASE)/Makefile.base diff --git a/cpu/samd21/hwtimer_arch.c b/sys/compat/hwtimer/hwtimer_arch.c similarity index 78% rename from cpu/samd21/hwtimer_arch.c rename to sys/compat/hwtimer/hwtimer_arch.c index 28825e51e3b103b7a52cee2d2c313856d159b20b..0325e33026381c5da27052f5e2cb907166ed537a 100644 --- a/cpu/samd21/hwtimer_arch.c +++ b/sys/compat/hwtimer/hwtimer_arch.c @@ -1,5 +1,7 @@ /* - * Copyright (C) 2014 Freie Universität Berlin + * Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de> + * 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 @@ -7,15 +9,16 @@ */ /** - * @ingroup cpu_samd21 + * @ingroup sys_compat * @{ * * @file hwtimer_arch.c - * @brief Implementation of the kernels hwtimer interface + * @brief Implementation of the kernels hwtimer interface over periph timers * - * The hardware timer implementation uses the Cortex build-in system timer as back-end. + * This hwtimer implementation wraps one periph timer * * @author Thomas Eichinger <thomas.eichinger@fu-berlin.de> + * @author Kaspar Schleiser <kaspar@schleiser.de> * * @} */