X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=cpu%2Farm%2Fdrv%2Ftimer_at91.c;h=b3db6a0fd3d5f37aa94da2ba6bf2869bc6553987;hb=HEAD;hp=e27e8a63e34e44ad8e692bcfff7cced167adde62;hpb=efbdba7e2814415234ef47bd10ff888559ea90af;p=bertos.git diff --git a/cpu/arm/drv/timer_at91.c b/cpu/arm/drv/timer_at91.c deleted file mode 100644 index e27e8a63..00000000 --- a/cpu/arm/drv/timer_at91.c +++ /dev/null @@ -1,95 +0,0 @@ -/** - * \file - * - * - * \version $Id$ - * - * \author Francesco Sacchi - * - * \brief Low-level timer module for Atmel AT91 (inplementation). - */ - -#include "timer_at91.h" -#include -#include "sysirq_at91.h" - -#include // BV() -#include -#include -#include - - -/** HW dependent timer initialization */ -#if (CONFIG_TIMER == TIMER_ON_PIT) - INLINE void timer_hw_irq(void) - { - /* Reset counters, this is needed to reset timer and interrupt flags */ - uint32_t dummy = PIVR; - (void) dummy; - } - - INLINE bool timer_hw_triggered(void) - { - return PIT_SR & BV(PITS); - } - - INLINE void timer_hw_init(void) - { - cpuflags_t flags; - - MOD_CHECK(sysirq); - - IRQ_SAVE_DISABLE(flags); - - PIT_MR = TIMER_HW_CNT; - /* Register system interrupt handler. */ - sysirq_setHandler(SYSIRQ_PIT, timer_handler); - - /* Enable interval timer and interval timer interrupts */ - PIT_MR |= BV(PITEN); - sysirq_setEnable(SYSIRQ_PIT, true); - - /* Reset counters, this is needed to start timer and interrupt flags */ - uint32_t dummy = PIVR; - (void) dummy; - - IRQ_RESTORE(flags); - } - - INLINE hptime_t timer_hw_hpread(void) - { - /* In the upper part of PIT_PIIR there is unused data */ - return PIIR & CPIV_MASK; - } - -#else - #error Unimplemented value for CONFIG_TIMER -#endif /* CONFIG_TIMER */