From: arighi Date: Thu, 3 Mar 2011 17:01:41 +0000 (+0000) Subject: move TIMER_AFTER() and TIMER_BEFORE() macros in drv/timer.h X-Git-Tag: 2.7.0~215 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=11bd07ba56015a0ad55fc0cb3b41d0757dcdc03f;p=bertos.git move TIMER_AFTER() and TIMER_BEFORE() macros in drv/timer.h git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4751 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/timer.h b/bertos/drv/timer.h index 83483b99..a68ee5b2 100644 --- a/bertos/drv/timer.h +++ b/bertos/drv/timer.h @@ -100,6 +100,9 @@ STATIC_ASSERT(sizeof(hptime_t) == SIZEOF_HPTIME_T); extern volatile ticks_t _clock; +#define TIMER_AFTER(x, y) ((long)(y) - (long)(x) < 0) +#define TIMER_BEFORE(x, y) TIMER_AFTER(y, x) + /** * \brief Return the system tick counter (expressed in ticks) * diff --git a/bertos/mware/event.h b/bertos/mware/event.h index 3d006059..5bc94e9e 100644 --- a/bertos/mware/event.h +++ b/bertos/mware/event.h @@ -246,10 +246,6 @@ INLINE void event_wait(Event *e) #if CONFIG_TIMER_EVENTS #include /* timer_clock() */ -/* TODO: move these macros to drv/timer.h */ -#define TIMER_AFTER(x, y) ((long)(y) - (long)(x) < 0) -#define TIMER_BEFORE(x, y) TIMER_AFTER(y, x) - /** * Wait the completion of event \a e or \a timeout elapses. *