]> rtime.felk.cvut.cz Git - CanFestival-3.git/blobdiff - include/timers_xeno/timerscfg.h
- add RTAI support
[CanFestival-3.git] / include / timers_xeno / timerscfg.h
index ff4d443988de53ce5c32027b74e01acdc7ad63dd..0409d78f8959ca9f61c8b1cc65cb26a5eeb17159 100644 (file)
@@ -26,14 +26,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #include <native/task.h>
 #include <native/timer.h>
 #include <native/mutex.h>
+#include <native/cond.h>
+#include <native/sem.h>
 #include <native/alarm.h>
 
 // Time unit : ns
 // Time resolution : 64bit (~584 years)
 #define TIMEVAL RTIME
 #define TIMEVAL_MAX ~(RTIME)0
-#define MS_TO_TIMEVAL(ms) (RTIME)ms*1000000
-#define US_TO_TIMEVAL(us) (RTIME)us*1000
+#define MS_TO_TIMEVAL(ms)  rt_timer_ns2ticks((RTIME)ms*1000000)
+#define US_TO_TIMEVAL(us)  rt_timer_ns2ticks((RTIME)us*1000)
 
 #define TASK_HANDLE RT_TASK