X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=drv%2Ftimer_posix.h;h=fd2e9c60cf24f734cc13f28d1d80025cfed7af52;hb=2535cb94ec2183791128f8bbd109ca69a960cf78;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..fd2e9c60 --- a/drv/timer_posix.h +++ b/drv/timer_posix.h @@ -1,8 +1,33 @@ -/*! +/** * \file * * * \version $Id$ @@ -11,27 +36,18 @@ * * \brief Low-level timer module for POSIX systems (interface). */ - -/*#* - *#* $Log$ - *#* Revision 1.1 2005/11/27 03:58:18 bernie - *#* Add POSIX timer emulator. - *#* - *#* Revision 1.1 2005/11/27 03:06:36 bernie - *#* Qt timer emulation. - *#* - *#*/ #ifndef DRV_TIMER_POSIX_H #define DRV_TIMER_POSIX_H // 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. @@ -40,5 +56,4 @@ /// Not needed. #define timer_hw_irq() do {} while (0) - -#endif /* DRV_TIMER_QT_H */ +#endif /* DRV_TIMER_POSIX_H */