Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

sys: add hwtimer compatibility layer for periph timers #2913

Merged
merged 2 commits into from
May 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpu/samd21/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions sys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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})))

Expand Down
1 change: 1 addition & 0 deletions sys/compat/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(RIOTBASE)/Makefile.base
3 changes: 3 additions & 0 deletions sys/compat/hwtimer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MODULE = hwtimer_compat

include $(RIOTBASE)/Makefile.base
11 changes: 7 additions & 4 deletions cpu/samd21/hwtimer_arch.c → sys/compat/hwtimer/hwtimer_arch.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
/*
* 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
* directory for more details.
*/

/**
* @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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could put your name in here, as you introduce this module...

* @author Kaspar Schleiser <kaspar@schleiser.de>
*
* @}
*/
Expand Down