From 9001e0c2fb5b76704bc9313d490eea8c3913ecf4 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Wed, 9 Jul 2014 21:08:13 +0200 Subject: [PATCH] core: removed duplicated hwtimer_arch.h --- boards/mbed_lpc1768/hwtimer_board.c | 2 +- core/hwtimer.c | 2 +- core/include/arch/hwtimer_arch.h | 15 +++-- core/include/hwtimer_arch.h | 77 -------------------------- cpu/cc430/hwtimer_cc430.c | 2 +- cpu/lpc_common/hwtimer_cpu.c | 2 +- cpu/mc1322x/hwtimer_cpu.c | 2 +- cpu/msp430-common/hwtimer_cpu.c | 2 +- cpu/msp430x16x/hwtimer_msp430.c | 2 +- cpu/native/hwtimer_cpu.c | 2 +- cpu/sam3x8e/hwtimer_arch.c | 2 +- cpu/x86/x86_hwtimer.c | 2 +- pkg/openwsn/patches/opentimers.c.patch | 2 +- pkg/openwsn/patches/scheduler.c.patch | 2 +- 14 files changed, 23 insertions(+), 93 deletions(-) delete mode 100644 core/include/hwtimer_arch.h diff --git a/boards/mbed_lpc1768/hwtimer_board.c b/boards/mbed_lpc1768/hwtimer_board.c index 9126b2eeb..530b68dc4 100644 --- a/boards/mbed_lpc1768/hwtimer_board.c +++ b/boards/mbed_lpc1768/hwtimer_board.c @@ -19,7 +19,7 @@ #include -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #define ENABLE_DEBUG (1) #include "debug.h" diff --git a/core/hwtimer.c b/core/hwtimer.c index bc0bc6c50..217fe5723 100644 --- a/core/hwtimer.c +++ b/core/hwtimer.c @@ -36,7 +36,7 @@ #include "hwtimer.h" #include "hwtimer_cpu.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" /*---------------------------------------------------------------------------*/ diff --git a/core/include/arch/hwtimer_arch.h b/core/include/arch/hwtimer_arch.h index 3114511c0..75c0be846 100644 --- a/core/include/arch/hwtimer_arch.h +++ b/core/include/arch/hwtimer_arch.h @@ -13,10 +13,9 @@ * @file hwtimer_arch.h * @brief The kernel's hardware timer abstraction interface * - * @author Freie Universität Berlin, Computer Systems & Telematics * @author Thomas Hillebrandt * @author Heiko Will - * @author Kaspar Schleiser + * @author Kaspar Schleiser * @author Hauke Petersen */ @@ -28,8 +27,8 @@ /** * @brief Initialize architecture dependent kernel timer support * - * @brief[in] handler callback that is called when timer offset is reached - * @brief[in] fcpu the core CPU-frequency for tick interval calculation + * @param[in] handler callback that is called when timer offset is reached + * @param[in] fcpu the core CPU-frequency for tick interval calculation */ void hwtimer_arch_init(void (*handler)(int), uint32_t fcpu); @@ -52,6 +51,14 @@ void hwtimer_arch_disable_interrupt(void); */ void hwtimer_arch_set(unsigned long offset, short timer); +/** + * @brief Set a kernel timer to raise an interrupt at specified system time. + * + * @param[in] value absolute timer tick value to set a timer channel to + * @param[in] timer the channel to set + */ +void hwtimer_arch_set_absolute(unsigned long value, short timer); + /** * @brief Unset the kernel timer with the given timer ID * diff --git a/core/include/hwtimer_arch.h b/core/include/hwtimer_arch.h deleted file mode 100644 index e533134fc..000000000 --- a/core/include/hwtimer_arch.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2013 Freie Universität Berlin - * - * This file is subject to the terms and conditions of the GNU Lesser General - * Public License. See the file LICENSE in the top level directory for more - * details. - */ - -/** - * @addtogroup core_hwtimer - * @{ - * - * @file hwtimer_arch.h - * @brief Architecture specific hwtimer API - * - * @author Freie Universität Berlin, Computer Systems & Telematics - * @author Thomas Hillebrandt - * @author Heiko Will - * @author Kaspar Schleiser - * @} - */ - -#ifndef HWTIMER_ARCH_H_ -#define HWTIMER_ARCH_H_ - -#include - -/** - * @brief Initialize architecture dependent kernel timer support. - * - * @param[in] handler callback function for the interrupt handler - * @param[in] fcpu cpu frequency - */ -void hwtimer_arch_init(void (*handler)(int), uint32_t fcpu); - -/** - * @brief Enable interrupts of hardware timers. - */ -void hwtimer_arch_enable_interrupt(void); - -/** - * @brief Disable interrupts of hardware timers. - */ -void hwtimer_arch_disable_interrupt(void); - -/** - * @brief Set a kernel timer to raise an interrupt after `offset` kernel timer - * ticks from now. - * - * @param[in] offset number of ticks - * @param[in] timer hardware timer identifier - */ -void hwtimer_arch_set(unsigned long offset, short timer); - -/** - * @brief Set a kernel timer to raise an interrupt at specified system time. - * - * @param[in] value system time - * @param[in] timer hardware timer identifier - */ -void hwtimer_arch_set_absolute(unsigned long value, short timer); - -/** - * @brief Unset the kernel timer with the given timer ID. - * - * @param[in] timer hardware timer identifier - */ -void hwtimer_arch_unset(short timer); - -/** - * Get the current tick count of the default hardware timer. - * - * @return The current tick count of the hardware timer - */ -unsigned long hwtimer_arch_now(void); - -#endif /* HWTIMER_ARCH_H_ */ diff --git a/cpu/cc430/hwtimer_cc430.c b/cpu/cc430/hwtimer_cc430.c index 75d6f6bed..3e8915c54 100644 --- a/cpu/cc430/hwtimer_cc430.c +++ b/cpu/cc430/hwtimer_cc430.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "hwtimer.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/cpu/lpc_common/hwtimer_cpu.c b/cpu/lpc_common/hwtimer_cpu.c index 946f7fdbd..052fb68c5 100644 --- a/cpu/lpc_common/hwtimer_cpu.c +++ b/cpu/lpc_common/hwtimer_cpu.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "bitarithm.h" #include "hwtimer_cpu.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #include "irq.h" #define VULP(x) ((volatile unsigned long*) (x)) diff --git a/cpu/mc1322x/hwtimer_cpu.c b/cpu/mc1322x/hwtimer_cpu.c index 4cb872611..db644674e 100644 --- a/cpu/mc1322x/hwtimer_cpu.c +++ b/cpu/mc1322x/hwtimer_cpu.c @@ -12,7 +12,7 @@ #include #include "mc1322x.h" #include "cpu.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #include "irq.h" #include diff --git a/cpu/msp430-common/hwtimer_cpu.c b/cpu/msp430-common/hwtimer_cpu.c index 11a6f1bfe..39428ccad 100644 --- a/cpu/msp430-common/hwtimer_cpu.c +++ b/cpu/msp430-common/hwtimer_cpu.c @@ -14,7 +14,7 @@ See the file LICENSE in the top level directory for more details. #include "cpu.h" #include "hwtimer.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/cpu/msp430x16x/hwtimer_msp430.c b/cpu/msp430x16x/hwtimer_msp430.c index 8c15ad90a..224e1ebf7 100644 --- a/cpu/msp430x16x/hwtimer_msp430.c +++ b/cpu/msp430x16x/hwtimer_msp430.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "hwtimer.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/cpu/native/hwtimer_cpu.c b/cpu/native/hwtimer_cpu.c index 9bef41d08..15e115503 100644 --- a/cpu/native/hwtimer_cpu.c +++ b/cpu/native/hwtimer_cpu.c @@ -35,7 +35,7 @@ #include #include "hwtimer.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #include "hwtimer_cpu.h" #include "cpu.h" diff --git a/cpu/sam3x8e/hwtimer_arch.c b/cpu/sam3x8e/hwtimer_arch.c index c27b32694..1e5b47cad 100644 --- a/cpu/sam3x8e/hwtimer_arch.c +++ b/cpu/sam3x8e/hwtimer_arch.c @@ -20,7 +20,7 @@ * @} */ -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #include "board.h" #include "periph/timer.h" #include "thread.h" diff --git a/cpu/x86/x86_hwtimer.c b/cpu/x86/x86_hwtimer.c index 74987dc4a..276220ebb 100644 --- a/cpu/x86/x86_hwtimer.c +++ b/cpu/x86/x86_hwtimer.c @@ -32,7 +32,7 @@ #include "x86_hwtimer.h" #include "x86_rtc.h" #include "x86_threading.h" -#include "hwtimer_arch.h" +#include "arch/hwtimer_arch.h" #include "irq.h" #include "thread.h" diff --git a/pkg/openwsn/patches/opentimers.c.patch b/pkg/openwsn/patches/opentimers.c.patch index e5a046ee2..0bb3ae774 100644 --- a/pkg/openwsn/patches/opentimers.c.patch +++ b/pkg/openwsn/patches/opentimers.c.patch @@ -36,7 +36,7 @@ ! #include "leds_ow.h" ! ! #include "hwtimer_cpu.h" -! #include "hwtimer_arch.h" +! #include "arch/hwtimer_arch.h" ! // #include "hwtimer.h" //=========================== define ========================================== diff --git a/pkg/openwsn/patches/scheduler.c.patch b/pkg/openwsn/patches/scheduler.c.patch index b46f7a567..8cc9b57fb 100644 --- a/pkg/openwsn/patches/scheduler.c.patch +++ b/pkg/openwsn/patches/scheduler.c.patch @@ -42,7 +42,7 @@ ! #include "board_ow.h" #include "debugpins.h" ! #include "leds_ow.h" -! #include "hwtimer_arch.h" +! #include "arch/hwtimer_arch.h" ! #include "thread.h" ! #define ENABLE_DEBUG (0)