From: David Schleef Date: Thu, 10 Feb 2000 00:11:16 +0000 (+0000) Subject: Updating for comedi-0.7.39 and RTLinux-2.1 X-Git-Tag: r0_7_9~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f060f85d90d124c5f42e0009c48aa0cf4e5dc42d;p=comedilib.git Updating for comedi-0.7.39 and RTLinux-2.1 --- diff --git a/demo/rt/Makefile b/demo/rt/Makefile index 2cf8771..64ded71 100644 --- a/demo/rt/Makefile +++ b/demo/rt/Makefile @@ -4,9 +4,14 @@ # I don't have RTLinux installed on the computer # that I use to compile, so I need this: -RTINCDIR = -I/b/ds/stuff/rtlinux/r-9J/rtl/include - -CFLAGS = -I../../include $(RTINCDIR) -O2 -Wall -D__RT__ -D__KERNEL__ -DMODULE +LINUXDIR := /d/ds/cvs/rtl/linux22 +RTINCDIR := /usr/include/rtlinux + +CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE +CFLAGS += -I $(LINUXDIR)/include +CFLAGS += -I $(RTINCDIR) -O2 -Wall -D__RTL__ +CFLAGS += -D__SMP__ +CFLAGS += -DMODVERSIONS -include $(LINUXDIR)/include/linux/modversions.h all: it.o ai.o diff --git a/demo/rt/it.c b/demo/rt/it.c index 642598a..276f601 100644 --- a/demo/rt/it.c +++ b/demo/rt/it.c @@ -1,9 +1,10 @@ - #include #include #include #include +#include +#include #include #include @@ -39,6 +40,7 @@ int init_module(void) trig.n_chan=1; trig.chanlist=&channel; trig.data=&data; + trig.data_len=1; trig.n=1; trig.trigsrc=0; trig.trigvar=0; @@ -50,11 +52,11 @@ int init_module(void) comedi_lock_ioctl(dev,subdev); /* configure DIO 0 for output */ - trig.flags=TRIG_CONFIG; + trig.flags=TRIG_CONFIG|TRIG_WRITE; data=COMEDI_OUTPUT; ret=comedi_trig_ioctl(dev,subdev,&trig); printk("comedi_trig_ioctl() returned %d\n",ret); - trig.flags=0; + trig.flags=TRIG_WRITE; data=1; /* a little test */ @@ -63,7 +65,7 @@ int init_module(void) rt_task_init(&mytask,do_comedi_toggle, 0xffff, 3000, 4); - rt_task_make_periodic(&mytask,now+3000,50000); + rt_task_make_periodic(&mytask,now+3000,1000); return 0; }