X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Ftimer_at91.c;h=beab00d60bf92fe7697033d75accdb3c9aa0947c;hb=24362270bbdf61ceedf3cecaf63fb1d36571e554;hp=a4375335d0d88527535935e2ce0f4de9cd584479;hpb=016c18c15fff909cd8f4a94e0f78a314889f8d93;p=bertos.git diff --git a/bertos/cpu/arm/drv/timer_at91.c b/bertos/cpu/arm/drv/timer_at91.c index a4375335..beab00d6 100644 --- a/bertos/cpu/arm/drv/timer_at91.c +++ b/bertos/cpu/arm/drv/timer_at91.c @@ -30,8 +30,6 @@ * * --> * - * \version $Id$ - * * \author Francesco Sacchi * * \brief Low-level timer module for Atmel AT91 (inplementation). @@ -49,23 +47,14 @@ /** 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); - } + ISR_PROTO_CONTEXT_SWITCH(timer_handler); - INLINE void timer_hw_init(void) + void timer_hw_init(void) { sysirq_init(); - cpuflags_t flags; + cpu_flags_t flags; MOD_CHECK(sysirq); @@ -86,12 +75,6 @@ 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 */