added a little das16m1 documentation
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 21 Jun 2001 18:23:19 +0000 (18:23 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 21 Jun 2001 18:23:19 +0000 (18:23 +0000)
Documentation/Configure.help
Documentation/comedi/Hardware_Driver.HOWTO
Documentation/comedi/drivers.txt
Documentation/comedi/hardware
comedi/drivers/das16m1.c

index 888c9375b8bd5acdc45b25be7889c5ac9a62ddb5..18a478e78219f1bd732e9a8a25631addd0808929 100644 (file)
@@ -136,6 +136,11 @@ DAS16 driver
 CONFIG_COMEDI_DAS16
   Includes support for Keithley Metrabye DAS16 and compatibles.
 
+DAS16M1 driver
+CONFIG_COMEDI_DAS16M1
+  Includes support for the Measurement Computing (Computer Boards)
+  CIO-DAS16/M1.  Does not support CIO-DAS16/M1/16.
+
 DAS6402 driver
 CONFIG_COMEDI_DAS6402
   Includes support for Keithley Metrabye DAS6402 and compatibles.
index 8472e83fbb373b6a400917b19affaed4fa870e0b..544a8dc22b3dc7de302cbfd0117ad356e3dc7c5f 100644 (file)
@@ -3,6 +3,7 @@ Hardware driver interface
 
 
 [ this is a little outdated -ds ]
+[ this is a lot outdated -fmh ]
 
 
 1. Introduction
index f7439a286af1d8067fc7a8286e8ac9eab9f4e509..e8b5c7e20ecfbbc1efdff297581a1d9f1fd41947 100644 (file)
@@ -165,12 +165,36 @@ Status: unknown
 
 Driver: das16.o
 Description: DAS16 compatible boards
-Authors: Sam Moore, Warren Jasper, ds
+Authors: Sam Moore, Warren Jasper, ds, Chris Baugher
 Status: in development
 
 A rewrite of the das16 and das1600 drivers.
 
 
+
+Driver: das16m1.o
+Description: CIO-DAS16/M1
+Authors: Frank Mori Hess <fmhess@uiuc.edu>
+Status: works
+
+This driver supports a single board - the CIO-DAS16/M1.
+As far as I know, there are no other boards that have
+the same register layout.  Even the CIO-DAS16/M1/16 is
+significantly different.
+
+Don't expect to reach the full 1 MHz capability of this
+board.  It can't do dma, so at 1 MHz your cpu is going
+to be spending almost all of its time trying to pull
+samples across the ISA bus.  I have gotten it to run
+at 833kHz though, using a hard real-time interrupt
+(TRIG_RT flag with rtlinux).
+
+Options:
+       [0] - base io address
+       [1] - irq (optional, but you probably want it)
+
+
+
 Driver: das16-old.o
 Description: CIO-DAS16 (& compatibles)
 Authors: Sam Moore, Warren Jasper, ds
index f3295a4084e2a98107354762fbe9f5ddadcc80e2..1f43fc58283370ae6d0b7dec0ce45f337093dd85 100644 (file)
@@ -51,13 +51,14 @@ ComputerBoards                      CIO-DAS08/JR/16                 das08
 ComputerBoards                 CIO-DAS16                       das16
 ComputerBoards                 CIO-DAS16/F                     das16
 ComputerBoards                 CIO-DAS16/JR                    das16
+ComputerBoards                 CIO-DAS16/330                   das16
 ComputerBoards                 CIO-DAS1401/12                  das16
 ComputerBoards                 CIO-DAS1402/12                  das16
 ComputerBoards                 CIO-DAS1402/16                  das16
 ComputerBoards                 CIO-DAS1601/12                  das16
 ComputerBoards                 CIO-DAS1602/12                  das16
 ComputerBoards                 CIO-DAS1602/16                  das16
-ComputerBoards                 CIO-DAS16/330                   das16
+ComputerBoards                 CIO-DAS16/M1                    das16m1
 ComputerBoards                 CIO-DAS800                      das800
 ComputerBoards                 CIO-DAS801                      das800
 ComputerBoards                 CIO-DAS802                      das800
index 801eb3121bc4dbc45b8adb34ce1cd1c6d962239a..29de95bf8f9a22d2d98c5c80a3dcc8648146911f 100644 (file)
@@ -2,7 +2,7 @@
     comedi/drivers/das16m1.c
     CIO-DAS16/M1 driver
     Author: Frank Mori Hess, based on code from the das16
-      driver by Chris Baugher.
+      driver.
 
     COMEDI - Linux Control and Measurement Device Interface
     Copyright (C) 2000 David A. Schleef <ds@stm.lbl.gov>
 ************************************************************************
 
 This driver is for the (freakish) Measurement Computing (Computer Boards)
-CIO-DAS16/M1 board.  The CIO-DAS16/M1/16 board actually has a different
-register layout and is not supported by this driver (although it might
-go nicely in the das16.c driver.)
+CIO-DAS16/M1 board.  The similarly namced CIO-DAS16/M1/16 board actually
+has a different register layout and is not supported by this driver
+(although it might go nicely in the das16.c driver.)
+
+Options:
+       [0] - base io address
+       [1] - irq (optional, required for timed or externally triggered conversions)
+
+irq can be omitted, although the cmd interface will not work without it.
+
+NOTES:
+This board has some unusual restrictions for its channel/gain list.  If the
+list has 2 or more channels in it, then two conditions must be satisfied:
+(1) - even/odd channels must appear at even/odd indices in the list
+(2) - the list must have an even number of entries.
 
 */
 
@@ -277,6 +289,12 @@ static int das16m1_cmd_exec(comedi_device *dev,comedi_subdevice *s)
        comedi_cmd *cmd = &s->async->cmd;
        unsigned int byte, i;
 
+       if(dev->irq == 0)
+       {
+               comedi_error(dev, "irq required to execute comedi_cmd");
+               return -1;
+       }
+
        devpriv->adc_count = cmd->stop_arg * cmd->chanlist_len;
 
        /* setup channel/gain queue */
@@ -600,7 +618,10 @@ static int das16m1_attach(comedi_device *dev, comedi_devconfig *it)
        outb(devpriv->do_bits, dev->iobase + DAS16M1_DIO);
 
        /* set the interrupt level */
-       devpriv->control_state = das16m1_irq_bits(dev->irq);
+       if(dev->irq)
+               devpriv->control_state = das16m1_irq_bits(dev->irq);
+       else
+               devpriv->control_state = 0;
        outb(devpriv->control_state, dev->iobase + DAS16M1_INTR_CONTROL);
 
        return 0;