00001
00022 #ifndef _RTAI_TIMER_H
00023 #define _RTAI_TIMER_H
00024
00025 #include <nucleus/timer.h>
00026 #include <rtai/types.h>
00027
00028 #define TM_UNSET XN_NO_TICK
00029 #define TM_ONESHOT XN_APERIODIC_TICK
00030
00031 typedef struct rt_timer_info {
00032
00033 RTIME period;
00034 RTIME date;
00035
00036 } RT_TIMER_INFO;
00037
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041
00042 SRTIME rt_timer_ns2ticks(SRTIME ns);
00043
00044 SRTIME rt_timer_ticks2ns(SRTIME ticks);
00045
00046 int rt_timer_inquire(RT_TIMER_INFO *info);
00047
00048 RTIME rt_timer_read(void);
00049
00050 RTIME rt_timer_tsc(void);
00051
00052 void rt_timer_spin(RTIME ns);
00053
00054 int rt_timer_start(RTIME nstick);
00055
00056 void rt_timer_stop(void);
00057
00058 #ifdef __cplusplus
00059 }
00060 #endif
00061
00062 #endif