Add function to read hp ticks.
[bertos.git] / bertos / cpu / avr / drv / timer_avr.h
index a2a413b60c5ce1b411eece4c42116f093b88451d..20764a1b60658328913da827d6a081b4cf160570 100644 (file)
 /** Not needed, timer IRQ handler called only for timer source */
 #define timer_hw_triggered() (true)
 
+
+INLINE hptime_t timer_hw_hpticks(ticks_t clock)
+{
+       return timer_hw_hpread() + clock * TIMER_HW_CNT;
+}
+
 void timer_hw_init(void);
 
 #endif /* DRV_TIMER_AVR_H */