X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=cpu%2Farm%2Fdrv%2Ftimer_at91.c;h=a4375335d0d88527535935e2ce0f4de9cd584479;hb=HEAD;hp=efe37d5a2b6b8d0f0c3b843eaaf0a0f20f77ab09;hpb=55c4d159825f90975aeeb4346c0e4e0c41df6f07;p=bertos.git diff --git a/cpu/arm/drv/timer_at91.c b/cpu/arm/drv/timer_at91.c deleted file mode 100644 index efe37d5a..00000000 --- a/cpu/arm/drv/timer_at91.c +++ /dev/null @@ -1,94 +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 - - -/** 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 */