00001
00002 #ifndef _COMEDI_COMMON_H
00003 #define _COMEDI_COMMON_H
00004
00005 #include <stdio.h>
00006
00007 #ifdef __cplusplus
00008 extern "C" {
00009 #endif
00010
00011
00012 extern int arm(comedi_t *device, unsigned subdevice, lsampl_t source);
00013 extern int disarm(comedi_t *device, unsigned subdevice);
00014 extern int reset_counter(comedi_t *device, unsigned subdevice);
00015 extern int set_counter_mode(comedi_t *device, unsigned subdevice, lsampl_t mode_bits);
00016 extern int set_clock_source(comedi_t *device, unsigned subdevice, lsampl_t clock, lsampl_t period_ns);
00017 extern int set_gate_source(comedi_t *device, unsigned subdevice, lsampl_t gate_index, lsampl_t gate_source);
00018 extern int comedi_internal_trigger(comedi_t *dev, unsigned int subd, unsigned int trignum);
00019
00020 #ifdef __cplusplus
00021 }
00022 #endif
00023
00024 #define sec_to_nsec(x) ((x)*1000000000)
00025 #define sec_to_usec(x) ((x)*1000000)
00026 #define sec_to_msec(x) ((x)*1000)
00027 #define msec_to_nsec(x) ((x)*1000000)
00028 #define msec_to_usec(x) ((x)*1000)
00029 #define usec_to_nsec(x) ((x)*1000)
00030
00031 #endif
00032