Merge branch "preempt" in "trunk".
[bertos.git] / bertos / cpu / arm / drv / timer_at91.c
index b3db6a0fd3d5f37aa94da2ba6bf2869bc6553987..2508b64baa8b30040cd0b8bc4ba606c9dad55314 100644 (file)
 
 /** 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();
 
                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 */