From 11bd07ba56015a0ad55fc0cb3b41d0757dcdc03f Mon Sep 17 00:00:00 2001 From: arighi Date: Thu, 3 Mar 2011 17:01:41 +0000 Subject: [PATCH] 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 --- bertos/drv/timer.h | 3 +++ bertos/mware/event.h | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) 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. * -- 2.25.1