X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Fat91%2Ftimer.c;h=d4de6a3b4d2611ac68cf3042cd8d8d8ee09c6407;hb=5f3952176a4e9a00ca8dd5ec4a6b994958f89e0a;hp=2b396fa1a56d0cc4e02361b61715ad3701441840;hpb=338e860b340dd66f9f6ec92e692a7aa116b0d6a8;p=bertos.git diff --git a/drv/at91/timer.c b/drv/at91/timer.c old mode 100755 new mode 100644 index 2b396fa1..d4de6a3b --- a/drv/at91/timer.c +++ b/drv/at91/timer.c @@ -23,12 +23,16 @@ #warning Very untested! INLINE static void timer_hw_irq(void) { - /* Reset counters, this is needed to start timer and interrupt flags */ + /* Reset counters, this is needed to reset timer and interrupt flags */ volatile uint32_t dummy = PIT_PIVR; } + INLINE static bool timer_hw_triggered(void) + { + return PIT_SR & BV(PITS); + } - static void timer_hw_init(void) + INLINE static void timer_hw_init(void) { cpuflags_t flags; IRQ_SAVE_DISABLE(flags); @@ -47,7 +51,7 @@ IRQ_RESTORE(flags); } - INLINE hptime_t timer_hw_hpread(void) + INLINE static hptime_t timer_hw_hpread(void) { /* In the upper part of PIT_PIIR there is unused data */ return PIT_PIIR & 0xfffff;