From 4f243660e59544df594932b166ad2c9c945b85d6 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Thu, 21 Jun 2001 18:23:19 +0000 Subject: [PATCH] added a little das16m1 documentation --- Documentation/Configure.help | 5 ++++ Documentation/comedi/Hardware_Driver.HOWTO | 1 + Documentation/comedi/drivers.txt | 26 +++++++++++++++++- Documentation/comedi/hardware | 3 ++- comedi/drivers/das16m1.c | 31 ++++++++++++++++++---- 5 files changed, 59 insertions(+), 7 deletions(-) diff --git a/Documentation/Configure.help b/Documentation/Configure.help index 888c9375..18a478e7 100644 --- a/Documentation/Configure.help +++ b/Documentation/Configure.help @@ -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. diff --git a/Documentation/comedi/Hardware_Driver.HOWTO b/Documentation/comedi/Hardware_Driver.HOWTO index 8472e83f..544a8dc2 100644 --- a/Documentation/comedi/Hardware_Driver.HOWTO +++ b/Documentation/comedi/Hardware_Driver.HOWTO @@ -3,6 +3,7 @@ Hardware driver interface [ this is a little outdated -ds ] +[ this is a lot outdated -fmh ] 1. Introduction diff --git a/Documentation/comedi/drivers.txt b/Documentation/comedi/drivers.txt index f7439a28..e8b5c7e2 100644 --- a/Documentation/comedi/drivers.txt +++ b/Documentation/comedi/drivers.txt @@ -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 +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 diff --git a/Documentation/comedi/hardware b/Documentation/comedi/hardware index f3295a40..1f43fc58 100644 --- a/Documentation/comedi/hardware +++ b/Documentation/comedi/hardware @@ -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 diff --git a/comedi/drivers/das16m1.c b/comedi/drivers/das16m1.c index 801eb312..29de95bf 100644 --- a/comedi/drivers/das16m1.c +++ b/comedi/drivers/das16m1.c @@ -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 @@ -24,9 +24,21 @@ ************************************************************************ 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; -- 2.26.2