diff --git a/demo/Makefile b/demo/Makefile index 0c5f209..87b34da 100644 --- a/demo/Makefile +++ b/demo/Makefile @@ -15,8 +15,8 @@ all: $(BINS) $(MBINS) $(BINS): % : %.o $(CC) $(LDFLAGS) -o $@ $< -$(MBINS): % : %.o main.o - $(CC) $(LDFLAGS) -o $@ main.o $< +$(MBINS): % : %.o common.o + $(CC) $(LDFLAGS) -o $@ common.o $< clean: -rm -f *.o $(BINS) $(MBINS) diff --git a/demo/README b/demo/README index f32bbf1..e9846aa 100644 --- a/demo/README +++ b/demo/README @@ -24,6 +24,10 @@ ao_waveform: which currently is some of the members of the NI AT-MIO and PCI-MIO E series. Creates a sine wave on an analog output channel. +common: + This is not an example. The file common.c just contains some code + that is common to many of the examples. + cmd: An example for directly using Comedi commands. Comedi commands are used for asynchronous acquisition, with the timing controlled @@ -61,10 +65,6 @@ ledclock: demo used a real-time task and controlled the parallel port directly. This version is not complete. -main: - This is not a demo. The file main.c just contains auxiliary - functions and parses options. - mmap: This example shows how to map the internal Comedi buffer and directly access samples instead of using read() and @@ -106,7 +106,7 @@ tut2: COMMAND-LINE OPTIONS: -Many of these demos are linked with the file main.c, which parses +Many of these demos are linked with the file common.c, which parses command line options. Some options don't make sense with all programs. The options are: diff --git a/demo/cmd.c b/demo/cmd.c index 3bb922c..091284d 100644 --- a/demo/cmd.c +++ b/demo/cmd.c @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) parse_options(argc,argv); /* The following global variables used in this demo are - * defined in main.c, and can be modified by command line + * defined in common.c, and can be modified by command line * options. When modifying this demo, you may want to * change them here. */ //filename = "/dev/comedi0"; diff --git a/demo/main.c b/demo/common.c similarity index 100% rename from demo/main.c rename to demo/common.c