RTXI 1.3
comedilib/demo/examples.h
Go to the documentation of this file.
00001 
00002 #ifndef _EXAMPLES_H
00003 #define _EXAMPLES_H
00004 
00005 #include <stdio.h>
00006 
00007 /*
00008  * Definitions of some of the common code.
00009  */
00010 
00011 extern comedi_t *device;
00012 
00013 struct parsed_options
00014 {
00015         char *filename;
00016         double value;
00017         int subdevice;
00018         int channel;
00019         int aref;
00020         int range;
00021         int physical;
00022         int verbose;
00023         int n_chan;
00024         int n_scan;
00025         double freq;
00026 };
00027 
00028 extern void init_parsed_options(struct parsed_options *options);
00029 extern int parse_options(struct parsed_options *options, int argc, char *argv[]);
00030 extern char *cmd_src(int src,char *buf);
00031 extern void dump_cmd(FILE *file,comedi_cmd *cmd);
00032 
00033 #define sec_to_nsec(x) ((x)*1000000000)
00034 #define sec_to_usec(x) ((x)*1000000)
00035 #define sec_to_msec(x) ((x)*1000)
00036 #define msec_to_nsec(x) ((x)*1000000)
00037 #define msec_to_usec(x) ((x)*1000)
00038 #define usec_to_nsec(x) ((x)*1000)
00039 
00040 #endif
00041 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines