X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer_posix.h;h=4cce9982725de8736dd7826b6991c694a9e5686b;hb=dd4c57ad1010a2347247fd6bbcce30956d3de791;hp=cd9ec84de70cb1dcc132f1bb60a1ade42865cf83;hpb=bbc33efb70a0062b36cc415452922e7ba69c748f;p=bertos.git diff --git a/drv/timer_posix.h b/drv/timer_posix.h old mode 100755 new mode 100644 index cd9ec84d..4cce9982 --- a/drv/timer_posix.h +++ b/drv/timer_posix.h @@ -1,8 +1,33 @@ -/*! +/** * \file * * * \version $Id$ @@ -14,6 +39,15 @@ /*#* *#* $Log$ + *#* Revision 1.4 2006/07/19 12:56:26 bernie + *#* Convert to new Doxygen style. + *#* + *#* Revision 1.3 2006/02/23 11:03:33 bernie + *#* Documentation fix. + *#* + *#* Revision 1.2 2006/02/21 21:28:02 bernie + *#* New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks longer than 1ms. + *#* *#* Revision 1.1 2005/11/27 03:58:18 bernie *#* Add POSIX timer emulator. *#* @@ -26,12 +60,13 @@ // HW dependent timer initialization -#define DEFINE_TIMER_ISR void timer_isr(int) -#define TIMER_TICKS_PER_MSEC 1 +#define DEFINE_TIMER_ISR void timer_isr(UNUSED_ARG(int, arg)) + +/** Most Linux kernels can't do better than this (CONFIG_HZ=250). */ +#define TIMER_TICKS_PER_SEC 250 + #define TIMER_HW_CNT (1<<31) /* We assume 32bit integers here */ -/// Type of time expressed in ticks of the hardware high-precision timer. -//typedef unsigned int hptime_t; #include /// Frequency of the hardware high-precision timer.