timer.h

Go to the documentation of this file.
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;       /* !< Current status (unset, aperiodic, period). */
00034     RTIME date;         /* !< Current wallclock time. */
00035     RTIME tsc;          /* !< Current tsc count. */
00036 
00037 } RT_TIMER_INFO;
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 SRTIME rt_timer_ns2ticks(SRTIME ns);
00044 
00045 SRTIME rt_timer_ticks2ns(SRTIME ticks);
00046 
00047 SRTIME rt_timer_ns2tsc(SRTIME ns);
00048 
00049 SRTIME rt_timer_tsc2ns(SRTIME ticks);
00050 
00051 int rt_timer_inquire(RT_TIMER_INFO *info);
00052 
00053 RTIME rt_timer_read(void);
00054 
00055 RTIME rt_timer_tsc(void);
00056 
00057 void rt_timer_spin(RTIME ns);
00058 
00059 int rt_timer_start(RTIME nstick);
00060 
00061 void rt_timer_stop(void);
00062 
00063 #ifdef __cplusplus
00064 }
00065 #endif
00066 
00067 #endif /* !_RTAI_TIMER_H */

Generated on Sat Sep 3 12:32:47 2005 for RTAI Fusion API by  doxygen 1.4.2