New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks...
[bertos.git] / drv / timer_posix.h
1 /*!
2  * \file
3  * <!--
4  * Copyright 2005 Develer S.r.l. (http://www.develer.com/)
5  * This file is part of DevLib - See README.devlib for information.
6  * -->
7  *
8  * \version $Id$
9  *
10  * \author Bernardo Innocenti <bernie@develer.com>
11  *
12  * \brief Low-level timer module for POSIX systems (interface).
13  */
14
15 /*#*
16  *#* $Log$
17  *#* Revision 1.2  2006/02/21 21:28:02  bernie
18  *#* New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks longer than 1ms.
19  *#*
20  *#* Revision 1.1  2005/11/27 03:58:18  bernie
21  *#* Add POSIX timer emulator.
22  *#*
23  *#* Revision 1.1  2005/11/27 03:06:36  bernie
24  *#* Qt timer emulation.
25  *#*
26  *#*/
27 #ifndef DRV_TIMER_POSIX_H
28 #define DRV_TIMER_POSIX_H
29
30 // HW dependent timer initialization
31
32 #define DEFINE_TIMER_ISR     void timer_isr(UNUSED_ARG(int, arg))
33 #define TIMER_TICKS_PER_SEC  250
34 #define TIMER_HW_CNT         (1<<31) /* We assume 32bit integers here */
35
36 #include <os/hptime.h>
37
38 /// Frequency of the hardware high-precision timer.
39 #define TIMER_HW_HPTICKS_PER_SEC  HPTIME_TICKS_PER_SECOND
40
41 /// Not needed.
42 #define timer_hw_irq() do {} while (0)
43
44
45 #endif /* DRV_TIMER_QT_H */