X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Ftimer_at91.c;h=2508b64baa8b30040cd0b8bc4ba606c9dad55314;hb=32d1445272120a254d77ce8d1af1f527da7a2c17;hp=e27e8a63e34e44ad8e692bcfff7cced167adde62;hpb=345f93de1963f49bdb194d2b06c8c5d7ba0a3e5f;p=bertos.git diff --git a/bertos/cpu/arm/drv/timer_at91.c b/bertos/cpu/arm/drv/timer_at91.c index e27e8a63..2508b64b 100644 --- a/bertos/cpu/arm/drv/timer_at91.c +++ b/bertos/cpu/arm/drv/timer_at91.c @@ -49,21 +49,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) { - cpuflags_t flags; + sysirq_init(); + + cpu_flags_t flags; MOD_CHECK(sysirq); @@ -84,12 +77,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 */