Patch from Anders Blomdell <anders.blomdell@control.lth.se> which makes
authorFrank Mori Hess <fmhess@speakeasy.net>
Tue, 4 Sep 2007 03:22:08 +0000 (03:22 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Tue, 4 Sep 2007 03:22:08 +0000 (03:22 +0000)
some of the addi-data drivers useable:

Since I need to use a driver for apci3106, I guess that I'll have to do some
cleanup of the addi-data drivers, but after downloading the drivers from
addi-data (http://www.addi-data.com/treiber/linux/comedi/comedi_Driver.tar.gz,
v_1.13), and comparing them with cvs, I'm at a loss about which drivers to use
as a starting point. I have enclosed a [tentative] patch against CVS
(patch.addi-data.20070828), that seems to work with apci3106-16-4. There is also
the patch against the CVS from late 2005 (patch.addi.2005-11-11) that I sent to
weber.serge@addi-data.com, asking him to do additional cleanup and then submit
it to the CVS maintainers, obviously this never happened :-( (and hence the last
batch of cards was of another brand).

23 files changed:
comedi/drivers/Kbuild
comedi/drivers/Makefile.am
comedi/drivers/addi-data/addi_common.c
comedi/drivers/addi-data/addi_common.h
comedi/drivers/addi-data/hwdrv_APCI1710.c
comedi/drivers/addi-data/hwdrv_apci035.c
comedi/drivers/addi-data/hwdrv_apci035.h
comedi/drivers/addi-data/hwdrv_apci1032.c
comedi/drivers/addi-data/hwdrv_apci1032.h
comedi/drivers/addi-data/hwdrv_apci1500.c
comedi/drivers/addi-data/hwdrv_apci1500.h
comedi/drivers/addi-data/hwdrv_apci1564.c
comedi/drivers/addi-data/hwdrv_apci1564.h
comedi/drivers/addi-data/hwdrv_apci2016.h
comedi/drivers/addi-data/hwdrv_apci2032.c
comedi/drivers/addi-data/hwdrv_apci2032.h
comedi/drivers/addi-data/hwdrv_apci3120.c
comedi/drivers/addi-data/hwdrv_apci3120.h
comedi/drivers/addi-data/hwdrv_apci3200.c
comedi/drivers/addi-data/hwdrv_apci3200.h
comedi/drivers/addi-data/hwdrv_apci3501.c
comedi/drivers/addi-data/hwdrv_apci3501.h
comedi/drivers/addi-data/hwdrv_apci3xxx.c

index 500248b93ba1e535f28e1d9b11ff2244dc62f1b3..4ed692683034cbf9d11012229f71ba3c6349f6aa 100644 (file)
@@ -23,6 +23,23 @@ obj-m += das08.o
 obj-m += mite.o
 obj-m += ni_labpc.o
 obj-m += acl7225b.o
+obj-m += addi_apci_035.o
+obj-m += addi_apci_1032.o
+obj-m += addi_apci_1500.o
+obj-m += addi_apci_1516.o
+obj-m += addi_apci_1564.o
+obj-m += addi_apci_16xx.o
+#obj-m += addi_apci_1710.o
+obj-m += addi_apci_2016.o
+obj-m += addi_apci_2032.o
+obj-m += addi_apci_2200.o
+obj-m += addi_apci_3001.o
+obj-m += addi_apci_3120.o
+#obj-m += addi_apci_3200.o
+#obj-m += addi_apci_3300.o
+obj-m += addi_apci_3501.o
+obj-m += addi_apci_3xxx.o
+#obj-m += addi_apci_all.o
 obj-m += adl_pci6208.o
 obj-m += adl_pci7296.o
 obj-m += adl_pci7432.o
index 22bfeb4ecdc16782470c5e8bfd770ba30ab893e2..1588d0f367bb39a66e3cecfe60246001eb7a2b58 100644 (file)
@@ -93,6 +93,23 @@ module_PROGRAMS = \
  mite.ko \
  ni_labpc.ko \
  acl7225b.ko \
+ addi_apci_035.ko \
+ addi_apci_1032.ko \
+ addi_apci_1500.ko \
+ addi_apci_1516.ko \
+ addi_apci_1564.ko \
+ addi_apci_16xx.ko \
+ addi_apci_1710.ko \
+ addi_apci_2016.ko \
+ addi_apci_2032.ko \
+ addi_apci_2200.ko \
+ addi_apci_3001.ko \
+ addi_apci_3120.ko \
+ addi_apci_3200.ko \
+ addi_apci_3300.ko \
+ addi_apci_3501.ko \
+ addi_apci_3xxx.ko \
+ addi_apci_all.ko \
  adl_pci6208.ko \
  adl_pci7296.ko \
  adl_pci7432.ko \
@@ -185,6 +202,23 @@ endif !CONFIG_KBUILD
 
 8255_ko_SOURCES = 8255.c
 acl7225b_ko_SOURCES = acl7225b.c
+addi_apci_all_ko_SOURCES = addi_apci_all.c
+addi_apci_035_ko_SOURCES = addi_apci_035.c
+addi_apci_1032_ko_SOURCES = addi_apci_1032.c
+addi_apci_1500_ko_SOURCES = addi_apci_1500.c
+addi_apci_1516_ko_SOURCES = addi_apci_1516.c
+addi_apci_1564_ko_SOURCES = addi_apci_1564.c
+addi_apci_16xx_ko_SOURCES = addi_apci_16xx.c
+addi_apci_1710_ko_SOURCES = addi_apci_1710.c
+addi_apci_2016_ko_SOURCES = addi_apci_2016.c
+addi_apci_2032_ko_SOURCES = addi_apci_2032.c
+addi_apci_2200_ko_SOURCES = addi_apci_2200.c
+addi_apci_3001_ko_SOURCES = addi_apci_3001.c
+addi_apci_3120_ko_SOURCES = addi_apci_3120.c
+addi_apci_3200_ko_SOURCES = addi_apci_3200.c
+addi_apci_3300_ko_SOURCES = addi_apci_3300.c
+addi_apci_3501_ko_SOURCES = addi_apci_3501.c
+addi_apci_3xxx_ko_SOURCES = addi_apci_3xxx.c
 adl_pci6208_ko_SOURCES = adl_pci6208.c
 adl_pci7296_ko_SOURCES = adl_pci7296.c
 adl_pci7432_ko_SOURCES = adl_pci7432.c
index b087d4c0e5ce756c4c74ca1e3cb9df8e92125697..c97d6aa3dcc684ffb62b073392bcceab5361efba 100644 (file)
@@ -92,24 +92,56 @@ void        fpu_end (void)
        }
 
 #include "addi_eeprom.c"
-#include "hwdrv_apci3120.c"
-#include "hwdrv_apci1032.c"
-#include "hwdrv_apci1516.c"
-#include "hwdrv_apci2016.c"
-#include "hwdrv_apci2032.c"
-#include "hwdrv_apci2200.c"
-#include "hwdrv_apci1564.c"
-#include "hwdrv_apci1500.c"
-#include "hwdrv_apci3501.c"
-#include "hwdrv_apci035.c"
-#include "hwdrv_apci3200.c" 
-#include "hwdrv_APCI1710.c"
-#include "hwdrv_apci16xx.c"
-#include "hwdrv_apci3xxx.c"
-
+#if (defined (CONFIG_APCI_3120) || defined (CONFIG_APCI_3001))
+   #include "hwdrv_apci3120.c"
+#endif
+#ifdef CONFIG_APCI_1032
+   #include "hwdrv_apci1032.c"
+#endif
+#ifdef CONFIG_APCI_1516
+   #include "hwdrv_apci1516.c"
+#endif
+#ifdef CONFIG_APCI_2016
+   #include "hwdrv_apci2016.c"
+#endif
+#ifdef CONFIG_APCI_2032
+   #include "hwdrv_apci2032.c"
+#endif
+#ifdef CONFIG_APCI_2200
+   #include "hwdrv_apci2200.c"
+#endif
+#ifdef CONFIG_APCI_1564
+   #include "hwdrv_apci1564.c"
+#endif
+#ifdef CONFIG_APCI_1500
+   #include "hwdrv_apci1500.c"
+#endif
+#ifdef CONFIG_APCI_3501
+   #include "hwdrv_apci3501.c"
+#endif
+#ifdef CONFIG_APCI_035
+   #include "hwdrv_apci035.c"
+#endif
+#if (defined (CONFIG_APCI_3200) || defined (CONFIG_APCI_3300))
+   #include "hwdrv_apci3200.c" 
+#endif
+#ifdef CONFIG_APCI_1710
+   #include "hwdrv_APCI1710.c"
+#endif
+#ifdef CONFIG_APCI_16XX
+   #include "hwdrv_apci16xx.c"
+#endif
+#ifdef CONFIG_APCI_3XXX
+   #include "hwdrv_apci3xxx.c"
+#endif
+
+#ifndef COMEDI_SUBD_TTLIO
+   #define COMEDI_SUBD_TTLIO   11  /* Digital Input Output But TTL */
+#endif
 
 static boardtype boardtypes[] =
 {
+#ifdef CONFIG_APCI_3120
                {"apci3120", 
                APCI3120_BOARD_VENDOR_ID,
                0x818D,
@@ -166,7 +198,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                },
-    
+#endif
+#ifdef CONFIG_APCI_1032    
                 {"apci1032",
                APCI1032_BOARD_VENDOR_ID,
                0x1003,
@@ -223,7 +256,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
-               
+#endif
+#ifdef CONFIG_APCI_1516
                 {"apci1516",
                APCI1516_BOARD_VENDOR_ID,
                0x1001,
@@ -279,7 +313,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
-
+#endif
+#ifdef CONFIG_APCI_2016
                 {"apci2016",
                APCI2016_BOARD_VENDOR_ID,
                0x1002,
@@ -336,7 +371,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
+#endif
+#ifdef CONFIG_APCI_2032
                 {"apci2032", 
                APCI2032_BOARD_VENDOR_ID, 
                0x1004,
@@ -392,7 +428,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
-               
+#endif
+#ifdef CONFIG_APCI_2200
                 {"apci2200",
                APCI2200_BOARD_VENDOR_ID,
                0x1005,
@@ -448,7 +485,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
-               
+#endif
+#ifdef CONFIG_APCI_1564
                 {"apci1564",
                APCI1564_BOARD_VENDOR_ID,
                0x1006,
@@ -505,7 +543,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
-               
+#endif
+#ifdef CONFIG_APCI_1500
                 {"apci1500", 
                APCI1500_BOARD_VENDOR_ID, 
                0x80fc,
@@ -562,8 +601,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
-                
-
+#endif
+#ifdef CONFIG_APCI_3001
                {"apci3001", 
                APCI3120_BOARD_VENDOR_ID, 
                0x828D,
@@ -620,7 +659,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                },
-               
+#endif
+#ifdef CONFIG_APCI_3501
                 {"apci3501", 
                APCI3501_BOARD_VENDOR_ID, 
                0x3001,
@@ -676,7 +716,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                 },
-               
+#endif
+#ifdef CONFIG_APCI_035
                 {"apci035", 
                APCI035_BOARD_VENDOR_ID, 
                0x0300,
@@ -733,7 +774,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                },
-               
+#endif
+#ifdef CONFIG_APCI_3200
                 {"apci3200", 
                APCI3200_BOARD_VENDOR_ID, 
                0x3000,
@@ -790,7 +832,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                },
-               
+#endif
+#ifdef CONFIG_APCI_3300
                //Begin JK 20.10.2004: APCI-3300 integration
                 {"apci3300", 
                APCI3200_BOARD_VENDOR_ID, 
@@ -848,8 +891,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                },
-               
-               //End JK 20.10.2004: APCI-3300 integration                              
+#endif
+#ifdef CONFIG_APCI_1710
                {"apci1710",APCI1710_BOARD_VENDOR_ID,APCI1710_BOARD_DEVICE_ID,
                128,
                8,
@@ -904,7 +947,8 @@ static boardtype boardtypes[] =
                NULL,
                NULL
                },
-               
+#endif
+#ifdef CONFIG_APCI_16XX
                 {"apci1648", 
                 0x15B8,
                 0x1009,
@@ -1019,7 +1063,8 @@ static boardtype boardtypes[] =
                i_APCI16XX_InsnReadTTLIOAllPortValue,
                i_APCI16XX_InsnBitsWriteTTLIO
                 },
-
+#endif
+#ifdef CONFIG_APCI_3XXX
                {"apci3000-16", 
                0x15B8,
                0x3010,
@@ -1381,7 +1426,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1438,7 +1483,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1495,7 +1540,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1552,7 +1597,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1609,7 +1654,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1666,7 +1711,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1721,9 +1766,9 @@ static boardtype boardtypes[] =
                4095,
                &range_apci3XXX_ai, 
                &range_apci3XXX_ao,
-               4,
-               4,
-               0xF,
+               0,
+               0,
+               0,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1778,9 +1823,9 @@ static boardtype boardtypes[] =
                4095,
                &range_apci3XXX_ai, 
                &range_apci3XXX_ao,
-               4,
-               4,
-               0xF,
+               0,
+               0,
+               0,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1835,9 +1880,9 @@ static boardtype boardtypes[] =
                4095,
                &range_apci3XXX_ai, 
                &range_apci3XXX_ao,
-               4,
-               4,
-               0xF,
+               0,
+               0,
+               0,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1892,9 +1937,9 @@ static boardtype boardtypes[] =
                4095,
                &range_apci3XXX_ai, 
                &range_apci3XXX_ao,
-               4,
-               4,
-               0xF,
+               0,
+               0,
+               0,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -1951,7 +1996,7 @@ static boardtype boardtypes[] =
                &range_apci3XXX_ao,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -2008,7 +2053,7 @@ static boardtype boardtypes[] =
                &range_apci3XXX_ao,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -2065,7 +2110,7 @@ static boardtype boardtypes[] =
                &range_apci3XXX_ao,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -2122,7 +2167,7 @@ static boardtype boardtypes[] =
                &range_apci3XXX_ao,
                4,
                4,
-               0xF,
+               1,
                24,
                &range_apci3XXX_ttl,
                0,
@@ -2179,7 +2224,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                0,
                NULL,
                0,
@@ -2235,7 +2280,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                0,
                NULL,
                0,
@@ -2291,7 +2336,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                0,
                NULL,
                0,
@@ -2347,7 +2392,7 @@ static boardtype boardtypes[] =
                NULL,
                4,
                4,
-               0xF,
+               1,
                0,
                NULL,
                0,
@@ -2440,6 +2485,7 @@ static boardtype boardtypes[] =
                i_APCI3XXX_InsnReadTTLIO,
                i_APCI3XXX_InsnWriteTTLIO
                },
+#endif
 };
 
 #define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
@@ -2450,7 +2496,7 @@ comedi_driver driver_addi ={
                attach:         i_ADDI_Attach,
                detach:         i_ADDI_Detach, 
                num_names:      n_boardtypes,
-               board_name:     boardtypes,
+               board_name:     &boardtypes[0].pc_DriverName,
                offset:         sizeof(boardtype),
        };
 
@@ -2721,10 +2767,12 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it)
 
        if (!strcmp(this_board->pc_DriverName,"apci1710"))
           {
+#ifdef CONFIG_APCI_1710
           i_ADDI_AttachPCI1710 (dev);
     
           // save base address
           devpriv->s_BoardInfos.ui_Address=io_addr[2];
+#endif
           }       
        else
        {
@@ -2740,15 +2788,22 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it)
        dev->read_subdev = s;
        s->type = COMEDI_SUBD_AI;
        s->subdev_flags = SDF_READABLE|SDF_RT|SDF_COMMON|SDF_GROUND|SDF_DIFF;
-       if (this_board->i_NbrAiChannel)
-          s->n_chan = this_board->i_NbrAiChannel;
+       if (this_board->i_NbrAiChannel) 
+         {
+           s->n_chan = this_board->i_NbrAiChannel;
+           devpriv->b_SingelDiff = 0;
+         }
        else
-          s->n_chan = this_board->i_NbrAiChannelDiff;
+         {
+           s->n_chan = this_board->i_NbrAiChannelDiff;
+           devpriv->b_SingelDiff = 1;
+         }
        s->maxdata = this_board->i_AiMaxdata;
        s->len_chanlist = this_board->i_AiChannelList;
        s->range_table = this_board->pr_AiRangelist;
        
-        
+        /* Set the initialisation flag */
+        devpriv->b_AiInitialisation = 1;        
         
         s->insn_config=this_board->i_hwdrv_InsnConfigAnalogInput;
        s->insn_read=this_board->i_hwdrv_InsnReadAnalogInput;
@@ -2851,10 +2906,10 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it)
        s->type         = COMEDI_SUBD_TTLIO;
        s->subdev_flags = SDF_WRITEABLE|SDF_READABLE|SDF_RT|SDF_GROUND|SDF_COMMON;
        s->n_chan       = this_board->i_NbrTTLChannel;
-       s->maxdata      = 0;
+       s->maxdata      = 1;
        s->io_bits=0;           /* all bits input */
        s->len_chanlist = this_board->i_NbrTTLChannel;
-       s->range_table  = this_board->pr_TTLRangelist; // to pass arguments in range    
+       s->range_table  = &range_digital;
         s->insn_config  = this_board->i_hwdr_ConfigInitTTLIO;
        s->insn_bits    = this_board->i_hwdr_ReadTTLIOBits;
         s->insn_read    = this_board->i_hwdr_ReadTTLIOAllPortValue;
@@ -3017,7 +3072,7 @@ static int i_ADDI_Reset(comedi_device *dev)
 /*
 +----------------------------------------------------------------------------+
 | Function name     :                                                        |
-|static void v_ADDI_Interrupt(int irq, void *d, struct pt_regs *regs)        |
+|static void v_ADDI_Interrupt(int irq, void *d  PT_REGS_ARG)                 |
 |                                                                                                               |
 +----------------------------------------------------------------------------+
 | Task              : Registerd interrupt routine                                                   |
@@ -3032,10 +3087,10 @@ static int i_ADDI_Reset(comedi_device *dev)
 +----------------------------------------------------------------------------+
 */
 
-static irqreturn_t v_ADDI_Interrupt(int irq, void *d, struct pt_regs *regs)
+static irqreturn_t v_ADDI_Interrupt(int irq, void *d  PT_REGS_ARG)
 {
 comedi_device *dev = d;
-this_board->v_hwdrv_Interrupt(irq,d,regs);
+this_board->v_hwdrv_Interrupt(irq,d);
 return IRQ_RETVAL(1);
 }
 // EEPROM Read Function
index 205efd370f8c33e75726d8e835b982510f4faa6b..c79c905bdc8d71190ffb070dac7b50acf8d5861f 100644 (file)
@@ -101,11 +101,16 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
 #define ADDIDATA_S5933        "S5933"
 #define ADDIDATA_9054         "9054"
 
+//ADDIDATA Enable Disable
+#define ADDIDATA_ENABLE                            1
+#define ADDIDATA_DISABLE                           0
+
+
 // Structures
 // structure for the boardtype
 typedef struct {
 
-               PCHAR           pc_DriverName; // driver name
+               const PCHAR             pc_DriverName; // driver name
                INT             i_VendorId;   //PCI vendor a device ID of card
                INT                     i_DeviceId;
                 INT         i_IorangeBase0;
@@ -137,7 +142,7 @@ typedef struct {
                UINT        ui_MinDelaytimeNs;       // Minimum Delay in Nano secs
 
 // interrupt and reset
- void (*v_hwdrv_Interrupt)(int irq, void *d, struct pt_regs *regs);
+ void (*v_hwdrv_Interrupt)(int irq, void *d);
  int (*i_hwdrv_Reset)(comedi_device *dev);
 
 //Subdevice functions 
@@ -496,7 +501,7 @@ static int i_ADDI_Attach(comedi_device *dev,comedi_devconfig *it);
 static int i_ADDI_Detach(comedi_device *dev);
 static int i_ADDI_Reset(comedi_device *dev);
 
-static irqreturn_t v_ADDI_Interrupt(int irq, void *d, struct pt_regs *regs);
+static irqreturn_t v_ADDI_Interrupt(int irq, void *d  PT_REGS_ARG);
 static int i_ADDIDATA_InsnReadEeprom(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 
 
index c0bfb18f335be007880250390467c3dd3b259a8c..a40c5b850b73a7fc662e8c9ed8f4bec157852cbd 100644 (file)
@@ -196,7 +196,7 @@ void        i_ADDI_AttachPCI1710 (comedi_device *dev)
  
  
 int i_APCI1710_Reset(comedi_device *dev);
-VOID v_APCI1710_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+VOID v_APCI1710_Interrupt(int irq, void *d) ;
 //for 1710
 
  int i_APCI1710_Reset(comedi_device *dev)
@@ -252,7 +252,7 @@ VOID v_APCI1710_Interrupt(int irq, void *d, struct pt_regs *regs) ;
        
 
 
-VOID v_APCI1710_Interrupt(int irq, void *d, struct pt_regs *regs)  
+VOID v_APCI1710_Interrupt(int irq, void *d)  
 {
        comedi_device *dev = d;
        BYTE   b_ModuleCpt       = 0;
index 7bec2903170862b88b64759627768ac634f5382c..8952f3bfab52dafbedb51c827c0c11f003e90263 100644 (file)
@@ -553,13 +553,12 @@ outl(0x0 , devpriv->iobase+128 + 12);//Disable the warning delay
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   : static void v_APCI035_Interrupt                                       |
-|                                        (int irq , void *d, struct pt_regs *regs)      |
+|                                        (int irq , void *d)      |
 +----------------------------------------------------------------------------+
 | Task              : Interrupt processing Routine                           |
 +----------------------------------------------------------------------------+
 | Input Parameters  : int irq                 : irq number                   |
 |                     void *d                 : void pointer                 |
-|                     struct pt_regs *regs    : structure pointer            |
 +----------------------------------------------------------------------------+
 | Output Parameters :  --                                                                                                       |
 +----------------------------------------------------------------------------+
@@ -568,7 +567,7 @@ outl(0x0 , devpriv->iobase+128 + 12);//Disable the warning delay
 |                                                                               |
 +----------------------------------------------------------------------------+
 */
-static void v_APCI035_Interrupt(int irq, void *d, struct pt_regs *regs
+static void v_APCI035_Interrupt(int irq, void *d) 
 {      
    comedi_device *dev = d;
    UINT ui_StatusRegister1 = 0;
index c473bf14764a555ccb7f92ed79a646ce7d7159fc..0b275ec214f17ccf6a6ac14225171d743037f704 100644 (file)
@@ -131,7 +131,7 @@ INT i_APCI035_ReadAnalogInput(comedi_device *dev,comedi_subdevice *s,comedi_insn
 
 
 //Interrupt
-static void v_APCI035_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+static void v_APCI035_Interrupt(int irq, void *d) ;
 
 //Reset functions
 INT i_APCI035_Reset(comedi_device *dev);       
index 8e692d79b7686a6af5a7fa24724cf03cc4c3b396..021bd5520e9f52c220d0ae4b4011e48c4999f7eb 100644 (file)
@@ -227,13 +227,12 @@ INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev,comedi_subdevice *s,comed
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   : static void v_APCI1032_Interrupt                                      |
-|                                        (int irq , void *d, struct pt_regs *regs)      |
+|                                        (int irq , void *d)      |
 +----------------------------------------------------------------------------+
 | Task              : Interrupt handler for the interruptible digital inputs |
 +----------------------------------------------------------------------------+
 | Input Parameters  : int irq                 : irq number                   |
 |                     void *d                 : void pointer                 |
-|                     struct pt_regs *regs    : structure pointer            |
 +----------------------------------------------------------------------------+
 | Output Parameters :  --                                                   |
 +----------------------------------------------------------------------------+
@@ -242,7 +241,7 @@ INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev,comedi_subdevice *s,comed
 |                                                                           |
 +----------------------------------------------------------------------------+
 */
-static VOID v_APCI1032_Interrupt(int irq,void* d, struct pt_regs *regs
+static VOID v_APCI1032_Interrupt(int irq,void* d) 
 {
  comedi_device *dev =d;        
  
index 467fe753d93c0ffe26810e3478e8af4eb4921e7b..fd8cd587f7c998a83caf9b1100a17f0a85a909a0 100644 (file)
@@ -76,6 +76,6 @@ INT i_APCI1032_ReadMoreDigitalInput(comedi_device *dev,comedi_subdevice *s,comed
 
 // Interrupt functions.....
 
-static VOID v_APCI1032_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+static VOID v_APCI1032_Interrupt(int irq, void *d) ;
 //Reset
 INT i_APCI1032_Reset(comedi_device *dev);
index d896d0569cbdab0ea8142f0f409cd78cee9bad18..a0819e35daca765060bfe33defab6564dfe8ce45 100644 (file)
@@ -2303,13 +2303,12 @@ return insn->n;
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   : static void v_APCI1500_Interrupt                                      |
-|                                        (int irq , void *d, struct pt_regs *regs)      |
+|                                        (int irq , void *d)      |
 +----------------------------------------------------------------------------+
 | Task              : Interrupt handler                                      |
 +----------------------------------------------------------------------------+
 | Input Parameters  : int irq                 : irq number                   |
 |                     void *d                 : void pointer                 |
-|                     struct pt_regs *regs    : structure pointer            |
 +----------------------------------------------------------------------------+
 | Output Parameters :  --                                                                                                       |
 +----------------------------------------------------------------------------+
@@ -2318,7 +2317,7 @@ return insn->n;
 |                                                                               |
 +----------------------------------------------------------------------------+
 */
-static VOID v_APCI1500_Interrupt(int irq,void* d, struct pt_regs *regs
+static VOID v_APCI1500_Interrupt(int irq,void* d) 
 {
  
  comedi_device *dev =d;
index 631d0fb594cf3380e882ae5d580245db7f2a789f..47df6d7925940c42d8c92e48bb4b02f15748fc8e 100644 (file)
@@ -143,7 +143,7 @@ static int i_APCI1500_ReadCounterTimerWatchdog(comedi_device *dev,comedi_subdevi
 static int i_APCI1500_ReadInterruptMask(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data); 
 
 /*----------INTERRUPT HANDLER------*/
-static void v_APCI1500_Interrupt(int irq, void *d, struct pt_regs *regs);
+static void v_APCI1500_Interrupt(int irq, void *d);
 static int i_APCI1500_ConfigureInterrupt(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 /*----------RESET---------------*/
 static int i_APCI1500_Reset(comedi_device *dev) ; 
index b18b17a1de563e75405cfd12a80167c430df47f3..b1078b08c922dc1c5edbb3479bc69b7e2cfbe0a4 100644 (file)
@@ -791,13 +791,12 @@ int i_APCI1564_ReadInterruptStatus(comedi_device *dev,comedi_subdevice *s,comedi
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   : static void v_APCI1564_Interrupt                                      |
-|                                        (int irq , void *d, struct pt_regs *regs)      |
+|                                        (int irq , void *d)      |
 +----------------------------------------------------------------------------+
 | Task              : Interrupt handler for the interruptible digital inputs |
 +----------------------------------------------------------------------------+
 | Input Parameters  : int irq                 : irq number                   |
 |                     void *d                 : void pointer                 |
-|                     struct pt_regs *regs    : structure pointer            |
 +----------------------------------------------------------------------------+
 | Output Parameters :  --                                                                                                       |
 +----------------------------------------------------------------------------+
@@ -806,7 +805,7 @@ int i_APCI1564_ReadInterruptStatus(comedi_device *dev,comedi_subdevice *s,comedi
 |                                                                               |
 +----------------------------------------------------------------------------+
 */
-static VOID v_APCI1564_Interrupt(int irq,void* d, struct pt_regs *regs
+static VOID v_APCI1564_Interrupt(int irq,void* d) 
 {
    comedi_device *dev =d;      
    UINT ui_DO, ui_DI;
index ffb81f169110de63de0bafa547bd3d4560fe3e3a..d70c2d2ea4163b74848b164f583f48fd2197ce78 100644 (file)
@@ -110,7 +110,7 @@ int i_APCI1564_StartStopWriteTimerCounterWatchdog(comedi_device *dev,comedi_subd
 int i_APCI1564_ReadTimerCounterWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 
 // INTERRUPT
-static VOID v_APCI1564_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+static VOID v_APCI1564_Interrupt(int irq, void *d) ;
 
 // RESET
 INT i_APCI1564_Reset(comedi_device *dev);
index cf1992099297ed5f6366ceb08110bc11afe1de1c..8550941c797a486c622b1c086cc33b53bb459900 100644 (file)
@@ -69,8 +69,8 @@ int i_APCI2016_ReadWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *
 
 // Interrupt functions.....
 
-// VOID v_APCI2016_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+// VOID v_APCI2016_Interrupt(int irq, void *d) ;
 
- //VOID v_APCI2016_Interrupt(int irq, void *d, struct pt_regs *regs);
+ //VOID v_APCI2016_Interrupt(int irq, void *d);
 // RESET
 INT i_APCI2016_Reset(comedi_device *dev);
index 6d1a5730d788b4aa1d3e780cc8d7427f71075ca2..123c85463f35a488f374e93949608541a5586e51 100644 (file)
@@ -466,13 +466,12 @@ return insn->n;
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   :  void v_APCI2032_Interrupt                                                |
-|                                        (int irq , void *d, struct pt_regs *regs)      |
+|                                        (int irq , void *d)      |
 +----------------------------------------------------------------------------+
 | Task              : Writes port value  To the selected port                |
 +----------------------------------------------------------------------------+
 | Input Parameters  : int irq                 : irq number                   |
 |                     void *d                 : void pointer                 |
-|                     struct pt_regs *regs    : structure pointer            |
 +----------------------------------------------------------------------------+
 | Output Parameters :  --                                                                                                       |
 +----------------------------------------------------------------------------+
@@ -481,7 +480,7 @@ return insn->n;
 |                                                                               |
 +----------------------------------------------------------------------------+
 */
- void v_APCI2032_Interrupt(int irq, void *d, struct pt_regs *regs
+ void v_APCI2032_Interrupt(int irq, void *d) 
 { 
        comedi_device *dev = d;
         unsigned int ui_DO;
index 6d67796d5b62e0f895eb2f28dffb3b88c84bfc00..8f8c6292467794a369a1187c169189f100562c3e 100644 (file)
@@ -79,7 +79,7 @@ int i_APCI2032_ReadWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *
  
 // Interrupt functions.....
 
-void v_APCI2032_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+void v_APCI2032_Interrupt(int irq, void *d) ;
 
 //Reset functions
  int i_APCI2032_Reset(comedi_device *dev);     
index f6929a73d614210f3c2d1c30607a6478c6e0585b..43529bbc607b737c97e210950a03236805c3e2b8 100644 (file)
@@ -1373,8 +1373,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev)
 
 /*
 +----------------------------------------------------------------------------+
-| Function name     : void v_APCI3120_Interrupt(int irq, void *d,            | 
-|                        struct pt_regs *regs)                                                                  |
+| Function name     : void v_APCI3120_Interrupt(int irq, void *d)                                                               |
 |                                                                                                               |
 |                                                                                               |
 +----------------------------------------------------------------------------+
@@ -1386,7 +1385,6 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev)
 +----------------------------------------------------------------------------+
 | Input Parameters  :  int irq                                                                                          |
 |                        void *d                                                                                        |
-|                      struct pt_regs *regs                                                             |
 |                                                                                               |
 +----------------------------------------------------------------------------+
 | Return Value      : void                                                                      |
@@ -1395,7 +1393,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev)
 */
 
 
- void v_APCI3120_Interrupt(int irq, void *d, struct pt_regs *regs
+ void v_APCI3120_Interrupt(int irq, void *d) 
 {      
        comedi_device *dev = d;
         USHORT int_daq;
@@ -1524,7 +1522,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev)
                         
                        //UPDATE-0.7.57->0.7.68comedi_done(dev,s); 
                        s->async->events |= COMEDI_CB_EOA;
-                       comedi_event(dev,s,s->async->events);                   
+                       comedi_event(dev,s);                    
                        
                        break;  
                                  
@@ -1574,7 +1572,7 @@ int i_APCI3120_ExttrigDisable(comedi_device * dev)
                        /* Clears the timer status register */
                        /************************************/
                        inw(dev->iobase+APCI3120_TIMER_STATUS_REGISTER);             
-                       v_APCI3120_InterruptDma(irq,d,regs); // do some data transfer
+                       v_APCI3120_InterruptDma(irq,d); // do some data transfer
                }
                 else
                 {
@@ -1650,7 +1648,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev)
        if (err==0)
           s->async->events |= COMEDI_CB_OVERFLOW;
        
-        comedi_event(dev,s,s->async->events);  
+        comedi_event(dev,s);   
          
        return 0;
 }
@@ -1659,8 +1657,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev)
 
 /*
 +----------------------------------------------------------------------------+
-| Function name     : void v_APCI3120_InterruptDma(int irq, void *d,         |
-|                       struct pt_regs *regs)                                                                   |
+| Function name     : void v_APCI3120_InterruptDma(int irq, void *d)                                                                    |
 |                                                                                                               |
 +----------------------------------------------------------------------------+
 | Task              : This is a handler for the DMA interrupt                |
@@ -1669,7 +1666,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev)
 |                        For single mode DMA it stop the acquisition.           |
 |                                                                                                                               |
 +----------------------------------------------------------------------------+
-| Input Parameters  : int irq, void *d, struct pt_regs *regs                            |
+| Input Parameters  : int irq, void *d                          |
 |                                                                                                                               |
 +----------------------------------------------------------------------------+
 | Return Value      :  void                                                                     |
@@ -1677,7 +1674,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev)
 +----------------------------------------------------------------------------+
 */
 
- void v_APCI3120_InterruptDma(int irq, void *d, struct pt_regs *regs
+ void v_APCI3120_InterruptDma(int irq, void *d) 
 {
        comedi_device *dev = d;
        comedi_subdevice *s = dev->subdevices + 0;      
@@ -1793,7 +1790,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev)
                if (!(devpriv->ui_AiFlags & TRIG_WAKE_EOS)) 
                {
                        s->async->events |= COMEDI_CB_EOS;
-                       comedi_event(dev,s,s->async->events);
+                       comedi_event(dev,s);
                 }
        }
        if (!devpriv->b_AiContinuous)
@@ -1803,7 +1800,7 @@ int i_APCI3120_InterruptHandleEos(comedi_device *dev)
            i_APCI3120_StopCyclicAcquisition(dev,s);
             devpriv->b_AiCyclicAcquisition=APCI3120_DISABLE;
            s->async->events |= COMEDI_CB_EOA;
-           comedi_event(dev,s,s->async->events);                       
+           comedi_event(dev,s);                        
             return;
        }
        
index b93cf7842c347978a061b83b7d6a7c4fe963ac91..41ad7e5a614105e1dfdae0454a588ad90998e9f0 100644 (file)
@@ -238,11 +238,11 @@ int i_APCI3120_StopCyclicAcquisition(comedi_device *dev,comedi_subdevice *s);
 int i_APCI3120_Reset(comedi_device *dev);
 int i_APCI3120_CyclicAnalogInput(int mode, comedi_device * dev,comedi_subdevice * s);
 // Interrupt functions
-void v_APCI3120_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+void v_APCI3120_Interrupt(int irq, void *d) ;
 //UPDATE-0.7.57->0.7.68        void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,sampl_t *dma,sampl_t *data,int n);
 void v_APCI3120_InterruptDmaMoveBlock16bit(comedi_device *dev,comedi_subdevice *s,sampl_t *dma_buffer,unsigned int num_samples);
 int i_APCI3120_InterruptHandleEos(comedi_device *dev);
-void v_APCI3120_InterruptDma(int irq, void *d, struct pt_regs *regs) ;
+void v_APCI3120_InterruptDma(int irq, void *d) ;
 
 
 
index dce0a6d771ecda866b0e37c152ecd3e49ed6dd18..0251970ef8cf66ba7ec44dbab44477139943b7b0 100644 (file)
@@ -2336,7 +2336,7 @@ int i_APCI3200_ReadCJCCalGain(comedi_device *dev,lsampl_t *data)
 INT i_APCI3200_InsnBits_AnalogInput_Test(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data) 
 {
   UINT         ui_Configuration=0;
-  //INT i_Temp,i_TimeUnit;
+  INT i_Temp;//,i_TimeUnit;
   //if(i_Initialised==0)
   
   if(s_BoardInfos [dev->minor].i_Initialised==0)  
@@ -2960,13 +2960,12 @@ int i_APCI3200_Reset(comedi_device *dev)
 /*
   +----------------------------------------------------------------------------+
   | Function   Name   : static void v_APCI3200_Interrupt                                            |
-  |                                      (int irq , void *d, struct pt_regs *regs)                              |
+  |                                      (int irq , void *d)                            |
   +----------------------------------------------------------------------------+
   | Task              : Interrupt processing Routine                           |
   +----------------------------------------------------------------------------+
   | Input Parameters  : int irq                 : irq number                   |
   |                     void *d                 : void pointer                 |
-  |                     struct pt_regs *regs    : structure pointer            |
   +----------------------------------------------------------------------------+
   | Output Parameters :        --                                                                                                       |
   +----------------------------------------------------------------------------+
@@ -2975,7 +2974,7 @@ int i_APCI3200_Reset(comedi_device *dev)
   |                                                                                             |
   +----------------------------------------------------------------------------+
 */
-void v_APCI3200_Interrupt(int irq, void *d, struct pt_regs *regs
+void v_APCI3200_Interrupt(int irq, void *d) 
 {      
   comedi_device *dev = d;
   UINT ui_StatusRegister=0;
@@ -3445,7 +3444,7 @@ int i_APCI3200_InterruptHandleEos(comedi_device *dev)
          comedi_buf_write_free(s->async, (7+12)*sizeof(lsampl_t));     
 
          // Send events
-         comedi_event(dev,s,s->async->events);           
+         comedi_event(dev,s);            
          //End JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68
 
          //BEGIN JK 18.10.2004: APCI-3200 Driver update 0.7.57 -> 0.7.68         
index 82b608c3e8550f596e668795775eb6b9b4be57e4..965236461f745251d6bfefee7ff53b0ab1195340 100644 (file)
@@ -101,10 +101,6 @@ comedi_lrange range_apci3300_ai={ 4, {
 #define ADDIDATA_UNIPOLAR                        1
 #define ADDIDATA_BIPOLAR                         2
 
-//ADDIDATA Enable Disable
-#define ADDIDATA_ENABLE                            1
-#define ADDIDATA_DISABLE                           0
-
 //BEGIN JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values
 #define MAX_MODULE                             4
 //END JK 21.10.2004: APCI-3200 / APCI-3300 Reading of EEPROM values
@@ -184,7 +180,7 @@ INT i_APCI3200_CommandTestAnalogInput(comedi_device *dev,comedi_subdevice *s,com
 INT i_APCI3200_CommandAnalogInput(comedi_device *dev,comedi_subdevice *s);
 INT i_APCI3200_ReadDigitalInput(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 //Interrupt
-void v_APCI3200_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+void v_APCI3200_Interrupt(int irq, void *d) ;
 int i_APCI3200_InterruptHandleEos(comedi_device *dev);
 //Reset functions
 INT i_APCI3200_Reset(comedi_device *dev);      
index 44f53f46c21e71f3c3953a5234d27ff176dd6bb7..3c07ee656c7e830c08a41cd77fc2ea78b504c7ce 100644 (file)
@@ -679,13 +679,12 @@ return 0;
 /*
 +----------------------------------------------------------------------------+
 | Function   Name   : static void v_APCI3501_Interrupt                                      |
-|                                        (int irq , void *d, struct pt_regs *regs)      |
+|                                        (int irq , void *d)      |
 +----------------------------------------------------------------------------+
 | Task              : Interrupt processing Routine                           |
 +----------------------------------------------------------------------------+
 | Input Parameters  : int irq                 : irq number                   |
 |                     void *d                 : void pointer                 |
-|                     struct pt_regs *regs    : structure pointer            |
 +----------------------------------------------------------------------------+
 | Output Parameters :  --                                                                                                       |
 +----------------------------------------------------------------------------+
@@ -694,7 +693,7 @@ return 0;
 |                                                                               |
 +----------------------------------------------------------------------------+
 */
- void v_APCI3501_Interrupt(int irq, void *d, struct pt_regs *regs
+ void v_APCI3501_Interrupt(int irq, void *d) 
 {
     int i_temp;        
     comedi_device *dev = d;
index 1797eb6bf14aa8de73788f8f05a41fac5b2aadc7..d233acd9c51e4b182c2ec87b3e6972d930dfdaa8 100644 (file)
@@ -82,7 +82,7 @@ INT i_APCI3501_ConfigTimerCounterWatchdog (comedi_device *dev,comedi_subdevice *
 int i_APCI3501_StartStopWriteTimerCounterWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 int i_APCI3501_ReadTimerCounterWatchdog(comedi_device *dev,comedi_subdevice *s,comedi_insn *insn,lsampl_t *data);
 //Interrupt
-void v_APCI3501_Interrupt(int irq, void *d, struct pt_regs *regs) ;
+void v_APCI3501_Interrupt(int irq, void *d) ;
 
 //Reset functions
  int i_APCI3501_Reset(comedi_device *dev);     
index d1705d043367b54faf270053157b0858ae91300a..41bcab7fd714a9ffa2c0dc68cd717ff26b743a4d 100755 (executable)
@@ -579,7 +579,7 @@ int   i_APCI3XXX_InsnReadAnalogInput (comedi_device    *dev,
           printk("Operating mode not configured\n");
           i_ReturnValue = -1;
           }
-       
+       printk("%x\n", i_ReturnValue);
        return (i_ReturnValue);
        }
 
@@ -588,8 +588,7 @@ int   i_APCI3XXX_InsnReadAnalogInput (comedi_device    *dev,
 /*
 +----------------------------------------------------------------------------+
 | Function name     : void v_APCI3XXX_Interrupt (int            irq,         |
-|                                                void           *d,          | 
-|                                                struct pt_regs *regs)       |
+|                                                void           *d)       |
 +----------------------------------------------------------------------------+
 | Task              :Interrupt handler for APCI3XXX                          |
 |                    When interrupt occurs this gets called.                 |
@@ -603,7 +602,7 @@ int   i_APCI3XXX_InsnReadAnalogInput (comedi_device    *dev,
 */
 
 
-void   v_APCI3XXX_Interrupt(int irq, void *d, struct pt_regs *regs
+void   v_APCI3XXX_Interrupt(int irq, void *d) 
        {
        comedi_device *dev       = d;
        BYTE           b_CopyCpt = 0;