VERS1 = 0
VERS2 = 7
-VERS3 = 36
+VERS3 = 37
INSTALLDIR=/usr
+#mainmenu_option next_comment
+#comment 'Comedi support'
+
+#tristate 'Comedi support' CONFIG_COMEDI
+
define_bool CONFIG_COMEDI m
+if [ "$CONFIG_COMEDI" != "n" ];then
+
comment 'Comedi Features'
-#bool 'Backwards compatibility' CONFIG_BACKWARDS
+#bool 'Backwards compatibility' CONFIG_COMEDI_BACKWARDS
tristate 'Kernel Comedilib' CONFIG_COMEDI_KLIB
if [ "$CONFIG_RTL" = "y" ];then
- define_bool CONFIG_COMEDI_RT y
- define_bool CONFIG_COMEDI_RTL y
+ bool 'Real-time support' CONFIG_COMEDI_RT
+ if [ "$CONFIG_COMEDI_RT" = "y" ];then
+ define_bool CONFIG_COMEDI_RTL y
+ fi
fi
-if [ "$CONFIG_RTAI" = "y" ];then
+if [ "$CONFIG_RTHAL" = "y" ];then
bool 'Real-time support' CONFIG_COMEDI_RT
- if [ "$CONFIG_RTAI" = "y" ];then
+ if [ "$CONFIG_COMEDI_RT" = "y" ];then
define_bool CONFIG_COMEDI_RTAI y
fi
fi
bool 'Verbose Debugging' CONFIG_COMEDI_DEBUG
+bool 'Version 0.8 support' CONFIG_COMEDI_VER08
comment 'Hardware device drivers'
bool 'Data Translation boards' CONFIG_COMEDI_DT
-if [ "$CONFIG_DT" = "y" ];then
- tristate 'DT 2801' CONFIG_COMEDI_DT2801
- tristate 'DT 2811' CONFIG_COMEDI_DT2811
- tristate 'DT 2814' CONFIG_COMEDI_DT2814
- tristate 'DT 2815' CONFIG_COMEDI_DT2815
- tristate 'DT 2817' CONFIG_COMEDI_DT2817
- tristate 'DT 2821 series' CONFIG_COMEDI_DT282x
- if [ "$CONFIG_EXPERIMENTAL" = "y" ];then
- tristate 'DT3000' CONFIG_COMEDI_DT3000
- fi
+if [ "$CONFIG_COMEDI_DT" = "y" ];then
+ tristate ' DT 2801' CONFIG_COMEDI_DT2801
+ tristate ' DT 2811' CONFIG_COMEDI_DT2811
+ tristate ' DT 2814' CONFIG_COMEDI_DT2814
+ tristate ' DT 2815' CONFIG_COMEDI_DT2815
+ tristate ' DT 2817' CONFIG_COMEDI_DT2817
+ tristate ' DT 2821 series' CONFIG_COMEDI_DT282x
+ tristate ' DT3000' CONFIG_COMEDI_DT3000
fi
bool 'National Instruments boards' CONFIG_COMEDI_NI
-if [ "$CONFIG_NI" = "y" ];then
- tristate 'AT-MIO E series' CONFIG_COMEDI_NI_ATMIO
+if [ "$CONFIG_COMEDI_NI" = "y" ];then
+ tristate ' AT-MIO E series' CONFIG_COMEDI_NI_ATMIO
if [ "$CONFIG_PCI" = "y" ];then
- tristate 'PCI-MIO E series' CONFIG_COMEDI_NI_PCIMIO
- tristate 'NI PCI-DIO series' CONFIG_COMEDI_NI_PCIDIO
+ tristate ' PCI-MIO E series' CONFIG_COMEDI_NI_PCIMIO
+ tristate ' NI PCI-DIO series' CONFIG_COMEDI_NI_PCIDIO
if [ "$CONFIG_COMEDI_NI_PCIMIO" = "y" -o "$CONFIG_COMEDI_NI_PCIDIO" = "y" ];then
define_bool CONFIG_COMEDI_MITE y
fi
tristate 'Analog Devices RTI-800/815' CONFIG_COMEDI_RTI800
tristate 'Analog Devices RTI-802' CONFIG_COMEDI_RTI802
+fi
+#endmenu
MOD_LIST_NAME := MISC_MODULES
M_OBJS := comedi.o
-MI_OBJS := module.o dummy.o proc.o range.o drivers.o kvmem.o
+MI_OBJS := comedi_fops.o dummy.o proc.o range.o drivers.o kvmem.o
MIX_OBJS := comedi_ksyms.o
+ifeq ($(CONFIG_COMEDI_REALTIME),y)
+MI_OBJS += rt.o
+endif
ifeq ($(CONFIG_COMEDI_RTL),y)
MI_OBJS += rtl.o
include $(TOPDIR)/Rules.make
-comedi.o: $(MI_OBJS)
- $(LD) -r -o $@ $(MI_OBJS)
+comedi.o: $(MI_OBJS) $(MIX_OBJS)
+ $(LD) -r -o $@ $(MI_OBJS) $(MIX_OBJS)
range.h: mk_range $(TOPDIR)/.config
-rm -f range.h
/*
- module/module.c
+ comedi/comedi_fops.c
comedi kernel module
COMEDI - Linux Control and Measurement Device Interface
- Copyright (C) 1997-8 David A. Schleef <ds@stm.lbl.gov>
+ Copyright (C) 1997-2000 David A. Schleef <ds@stm.lbl.gov>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <comedi_module.h>
+#define __NO_VERSION__
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
return -EINVAL;
}
-#ifdef CONFIG_COMEDI_RT
-
-static struct comedi_irq_struct *comedi_irqs;
-
-int comedi_request_irq(unsigned irq,void (*handler)(int, void *,struct pt_regs *),
- unsigned long flags,const char *device,void *dev_id)
-{
- struct comedi_irq_struct *it;
- int ret;
-
- it=kmalloc(sizeof(*it),GFP_KERNEL);
- if(!it)
- return -ENOMEM;
-
- it->handler=handler;
- it->irq=irq;
- it->dev_id=dev_id;
- it->flags=flags;
-
- ret=request_irq(irq,handler,flags&~SA_PRIORITY,device,dev_id);
- if(ret<0){
- kfree(it);
- return ret;
- }
-
- if(flags&SA_PRIORITY){
- get_priority_irq(it);
- }
-
- it->next=comedi_irqs;
- comedi_irqs=it;
-
- return 0;
-}
-
-int comedi_change_irq_flags(unsigned int irq,void *dev_id,unsigned long flags)
-{
- struct comedi_irq_struct *it;
-
- it=get_irq_struct(irq);
- if(it){
- if((it->flags&~SA_PRIORITY)!=(flags&~SA_PRIORITY))
- return -EINVAL;
-
- if((it->flags&SA_PRIORITY)==(flags&SA_PRIORITY))
- return 0;
-
- it->flags=flags;
- if(flags&SA_PRIORITY){
- return get_priority_irq(it);
- }else{
- return free_priority_irq(it);
- }
- }
-
- return -EINVAL;
-}
-
-void comedi_free_irq(unsigned int irq,void *dev_id)
-{
- struct comedi_irq_struct *it,*prev;
-
- prev=NULL;
- for(it=comedi_irqs;it;it=it->next){
- if(it->irq==irq){
- break;
- }
- prev=it;
- }
- if(it->flags&SA_PRIORITY)
- free_priority_irq(it);
-
- free_irq(it->irq,it->dev_id);
-
- if(prev) prev->next=it->next;
- else comedi_irqs=it->next;
-
- kfree(it);
-}
-
-struct comedi_irq_struct *get_irq_struct(unsigned int irq)
-{
- struct comedi_irq_struct *it;
-
- for(it=comedi_irqs;it;it=it->next){
- if(it->irq==irq){
- return it;
- }
- }
- return NULL;
-}
-
-#endif
-
EXPORT_SYMBOL(comedi_bufcheck);
EXPORT_SYMBOL(comedi_done);
EXPORT_SYMBOL(comedi_error);
+EXPORT_SYMBOL(do_pack);
+EXPORT_SYMBOL(di_unpack);
+EXPORT_SYMBOL(comedi_eobuf);
+EXPORT_SYMBOL(comedi_eos);
#endif
rt_printk("ni_E: timeout 1\n");
}
+static int ni_ai_cmd(comedi_device *dev,comedi_subdevice *s)
+{
+ int wsave;
+
+ wsave = win_save();
+
+ win_out(1,ADC_FIFO_Clear);
+
+
+
+ return 0;
+}
/*
mode 2 is timed, multi-channel
#include <comedi_module.h>
#include <linux/kernel.h>
-#include <linux/module.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <asm/irq.h>
#include <rtl.h>
#include <linux/kernel.h>
-#include <linux/module.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <asm/irq.h>
#include <comedi_module.h>
#include <linux/kernel.h>
-#include <linux/module.h>
#include <linux/string.h>
#include <linux/sched.h>
#include <asm/irq.h>
#
# Automatically generated make config: don't edit
#
+CONFIG_COMEDI=m
#
-# Features
+# Comedi Features
#
-CONFIG_EXPORT=y
-# CONFIG_COMEDI_RT is not set
-CONFIG_DEBUG=y
+CONFIG_COMEDI_KLIB=y
+CONFIG_COMEDI_DEBUG=y
#
# Hardware device drivers
#
-CONFIG_DT=y
-# CONFIG_DT2801 is not set
-# CONFIG_DT2811 is not set
-# CONFIG_DT2814 is not set
-# CONFIG_DT2815 is not set
-# CONFIG_DT2817 is not set
-# CONFIG_DT282x is not set
-CONFIG_NI=y
-# CONFIG_ATMIO_E is not set
-# CONFIG_PCIMIO_E is not set
-# CONFIG_NI_PCIDIO is not set
-# CONFIG_DAS08 is not set
-# CONFIG_DAS08JR is not set
-# CONFIG_DAS1600 is not set
-# CONFIG_8255 is not set
+CONFIG_COMEDI_DT=y
+# CONFIG_COMEDI_DT2801 is not set
+# CONFIG_COMEDI_DT2811 is not set
+# CONFIG_COMEDI_DT2814 is not set
+# CONFIG_COMEDI_DT2815 is not set
+# CONFIG_COMEDI_DT2817 is not set
+# CONFIG_COMEDI_DT282x is not set
+# CONFIG_COMEDI_DT3000 is not set
+CONFIG_COMEDI_NI=y
+# CONFIG_COMEDI_NI_ATMIO is not set
+# CONFIG_COMEDI_NI_PCIMIO is not set
+# CONFIG_COMEDI_NI_PCIDIO is not set
+# CONFIG_COMEDI_DAS08 is not set
+# CONFIG_COMEDI_DAS08JR is not set
+# CONFIG_COMEDI_DAS1600 is not set
+# CONFIG_COMEDI_DAS16 is not set
+# CONFIG_COMEDI_DAS6402 is not set
+# CONFIG_COMEDI_8255 is not set
+# CONFIG_COMEDI_MULTIQ3 is not set
# CONFIG_COMEDI_PARPORT is not set
-# CONFIG_RTI800 is not set
-# CONFIG_RTI802 is not set
-# CONFIG_PCL711 is not set
-# CONFIG_PCL725 is not set
-# CONFIG_PCL726 is not set
-# CONFIG_MULTIQ3 is not set
-
-#
-# Experimental extras (might not compile and/or work)
-#
-# CONFIG_ATMIO16F is not set
-# CONFIG_DAS6402 is not set
-# CONFIG_RTI860 is not set
-# CONFIG_DT3000 is not set
-# CONFIG_DAS16 is not set
+# CONFIG_COMEDI_PCL711 is not set
+# CONFIG_COMEDI_PCL725 is not set
+# CONFIG_COMEDI_PCL726 is not set
+# CONFIG_COMEDI_RTI800 is not set
+# CONFIG_COMEDI_RTI802 is not set