2000-10-19 06:29:14 +00:00
|
|
|
|
|
|
|
#ifndef _EXAMPLES_H
|
|
|
|
#define _EXAMPLES_H
|
|
|
|
|
2001-07-14 00:50:52 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2000-10-19 06:29:14 +00:00
|
|
|
/*
|
|
|
|
* Definitions of some of the common code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern char *filename;
|
|
|
|
extern int verbose_flag;
|
|
|
|
extern comedi_t *device;
|
|
|
|
|
|
|
|
extern int value;
|
|
|
|
extern int subdevice;
|
|
|
|
extern int channel;
|
|
|
|
extern int aref;
|
|
|
|
extern int range;
|
2006-07-20 11:51:54 +00:00
|
|
|
extern int physical;
|
2001-07-14 00:50:52 +00:00
|
|
|
extern int verbose;
|
|
|
|
extern int n_chan;
|
|
|
|
extern int n_scan;
|
|
|
|
extern double freq;
|
2000-10-19 06:29:14 +00:00
|
|
|
|
|
|
|
int parse_options(int argc, char *argv[]);
|
2001-03-01 21:57:00 +00:00
|
|
|
char *cmd_src(int src,char *buf);
|
2001-07-14 00:50:52 +00:00
|
|
|
void dump_cmd(FILE *file,comedi_cmd *cmd);
|
2001-03-01 21:57:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define sec_to_nsec(x) ((x)*1000000000)
|
|
|
|
#define sec_to_usec(x) ((x)*1000000)
|
|
|
|
#define sec_to_msec(x) ((x)*1000)
|
|
|
|
#define msec_to_nsec(x) ((x)*1000000)
|
|
|
|
#define msec_to_usec(x) ((x)*1000)
|
|
|
|
#define usec_to_nsec(x) ((x)*1000)
|
2000-10-19 06:29:14 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|