projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move TIMER_AFTER() and TIMER_BEFORE() macros in drv/timer.h
[bertos.git]
/
bertos
/
drv
/
timer.h
diff --git
a/bertos/drv/timer.h
b/bertos/drv/timer.h
index 83483b9975c4f5a9bc26693a723be828ac2271ae..a68ee5b21dd9703735582fdad4c701ea7f10ec69 100644
(file)
--- 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;
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)
*
/**
* \brief Return the system tick counter (expressed in ticks)
*