comedi.git
16 years agoAdded __module_get() compatibility (just in case we ever support 2.4.x
Ian Abbott [Fri, 18 Apr 2008 13:40:09 +0000 (13:40 +0000)]
Added __module_get() compatibility (just in case we ever support 2.4.x
kernels again!).

16 years agoChanged initializers of 'ni_gainlkup[][16]' and 'ni_range_lkup[]' to use
Ian Abbott [Wed, 16 Apr 2008 15:05:46 +0000 (15:05 +0000)]
Changed initializers of 'ni_gainlkup[][16]' and 'ni_range_lkup[]' to use
index designators (just to help readability).

16 years agoFixed value that used to calculate ao hardware fifo size which was
Frank Mori Hess [Wed, 16 Apr 2008 12:45:50 +0000 (12:45 +0000)]
Fixed value that used to calculate ao hardware fifo size which was
in number of samples, but should have been number
of bytes.

16 years agoCorrected error in previous commit (PCI bus/slot option support).
Ian Abbott [Mon, 14 Apr 2008 14:58:50 +0000 (14:58 +0000)]
Corrected error in previous commit (PCI bus/slot option support).

16 years agoAdded PCI bus/slot configuration options.
Ian Abbott [Mon, 14 Apr 2008 14:47:56 +0000 (14:47 +0000)]
Added PCI bus/slot configuration options.

16 years agoDocumented pci bus/slot configuration options.
Ian Abbott [Mon, 14 Apr 2008 14:43:44 +0000 (14:43 +0000)]
Documented pci bus/slot configuration options.

16 years agoUpdated heading comment as the PCI bus/slot options were incorrectly
Ian Abbott [Mon, 14 Apr 2008 14:17:28 +0000 (14:17 +0000)]
Updated heading comment as the PCI bus/slot options were incorrectly
marked as "unimplemented".

16 years agoDescribe bus/slot options.
Ian Abbott [Mon, 14 Apr 2008 14:13:57 +0000 (14:13 +0000)]
Describe bus/slot options.

16 years agoAdded Stephen Chivers (Advantech PCI-1736UP support).
Ian Abbott [Mon, 14 Apr 2008 10:00:59 +0000 (10:00 +0000)]
Added Stephen Chivers (Advantech PCI-1736UP support).

16 years agoMoved a few entries to keep in order.
Ian Abbott [Mon, 14 Apr 2008 09:59:29 +0000 (09:59 +0000)]
Moved a few entries to keep in order.

16 years agoAdded support for Advantech PCI-1736UP.
Ian Abbott [Mon, 14 Apr 2008 09:53:33 +0000 (09:53 +0000)]
Added support for Advantech PCI-1736UP.
(Code supplied by Stephen Chivers <schivers at csc dot com dot au>.)

16 years agoCorrected PCMCIA test in revision 1.43.
Ian Abbott [Sat, 12 Apr 2008 20:24:03 +0000 (20:24 +0000)]
Corrected PCMCIA test in revision 1.43.

16 years agoOops, I forgot the module init and exit functions!
Ian Abbott [Sat, 12 Apr 2008 20:12:42 +0000 (20:12 +0000)]
Oops, I forgot the module init and exit functions!

16 years agoStopped the 'ni_atmio' and 'ni_mio_cs' drivers depending on the 'mite'
Ian Abbott [Fri, 11 Apr 2008 15:54:27 +0000 (15:54 +0000)]
Stopped the 'ni_atmio' and 'ni_mio_cs' drivers depending on the 'mite'
module indirectly.  The 'ni_tio' module has been split into two modules,
'ni_tio' and 'ni_tiocmd'.  The 'ni_tiocmd' module has the command
processing that depends on the 'mite' module.  The 'ni_tio' module no
longer depends on 'mite'.

Also fixed some .symvers dependencies for non-Kbuild builds.

16 years agoChanged condition for including <asm/bug.h>.
Ian Abbott [Fri, 11 Apr 2008 11:16:41 +0000 (11:16 +0000)]
Changed condition for including <asm/bug.h>.

16 years agoChanged linux/kref.h compatibility header to make the API appear to be like
Ian Abbott [Fri, 11 Apr 2008 11:11:28 +0000 (11:11 +0000)]
Changed linux/kref.h compatibility header to make the API appear to be like
it is in the 2.6.12 kernel.

16 years agoCorrected previous commit.
Ian Abbott [Thu, 10 Apr 2008 17:44:24 +0000 (17:44 +0000)]
Corrected previous commit.

16 years agoI broke it in the previous commit.
Ian Abbott [Thu, 10 Apr 2008 17:18:11 +0000 (17:18 +0000)]
I broke it in the previous commit.

16 years agoAllow Comedi to be built without PCI drivers. The PCI drivers won't be built
Ian Abbott [Thu, 10 Apr 2008 14:43:06 +0000 (14:43 +0000)]
Allow Comedi to be built without PCI drivers. The PCI drivers won't be built
if the kernel has no PCI support or if a new configure option '--disable-pci'
is used.

16 years agoMoved labpc_cs_boards[] from ni_labpc.c to ni_labpc_cs.c and exported
Ian Abbott [Thu, 10 Apr 2008 11:01:40 +0000 (11:01 +0000)]
Moved labpc_cs_boards[] from ni_labpc.c to ni_labpc_cs.c and exported
range_labpc_1200_ai, labpc_1200_ai_gain_bits[] and labpc_1200_is_unipolar[]
from ni_labpc.c for use by ni_labpc_cs.c.

16 years agoAdded automake conditionals CONFIG_COMEDI_USB and CONFIG_COMEDI_PCMCIA and
Ian Abbott [Thu, 10 Apr 2008 09:57:29 +0000 (09:57 +0000)]
Added automake conditionals CONFIG_COMEDI_USB and CONFIG_COMEDI_PCMCIA and
used these in place of the automake conditionals CONFIG_USB and
CONFIG_PCMCIA.  The automake conditionals CONFIG_USB and CONFIG_PCMCIA are
no longer used (currently) but they no longer depend on the --disable-usb
or --disable-pcmcia configure options.  The new automake conditional
CONFIG_COMEDI_USB/CONFIG_COMEDI_PCMCIA is 'FALSE' if --disable-usb/
--disable-pcmcia is specified; otherwise it has the same value as
CONFIG_USB/CONFIG_PCMCIA.

Added config.h defines CONFIG_COMEDI_USB and CONFIG_COMEDI_PCMCIA which are
defined only if the corresponding automake conditional is 'TRUE'.

Changed the --(en|dis)able-pcmcia option so that it is no longer necessary
to specify --enable-pcmcia explicitly to build the PCMCIA modules.

16 years agoFixed single-channel ao waveform on 6xxx boards, which I broke with
Frank Mori Hess [Tue, 1 Apr 2008 19:10:35 +0000 (19:10 +0000)]
Fixed single-channel ao waveform on 6xxx boards, which I broke with
last commit.

16 years agoFixed multi-channel analog output commands on pxi-6713.
Frank Mori Hess [Tue, 1 Apr 2008 15:27:49 +0000 (15:27 +0000)]
Fixed multi-channel analog output commands on pxi-6713.

16 years agoAdded INSN_CONFIG_GET_HARDWARE_BUFFER_SIZE and implemented for
Frank Mori Hess [Fri, 28 Mar 2008 15:15:59 +0000 (15:15 +0000)]
Added INSN_CONFIG_GET_HARDWARE_BUFFER_SIZE and implemented for
analog output of NI boards.

16 years agoChanged INSN_GET_PWM_STATUS to INSN_CONFIG_GET_PWM_STATUS.
Frank Mori Hess [Fri, 28 Mar 2008 14:07:45 +0000 (14:07 +0000)]
Changed INSN_GET_PWM_STATUS to INSN_CONFIG_GET_PWM_STATUS.

16 years agoAdded yonggang <rsmgnu at gmail dot com> (Advantech PCI-1723 driver).
Ian Abbott [Wed, 26 Mar 2008 14:27:16 +0000 (14:27 +0000)]
Added yonggang <rsmgnu at gmail dot com> (Advantech PCI-1723 driver).

16 years agoFix for crashes with dma enabled using pci-6143. Based on patch from
Frank Mori Hess [Wed, 26 Mar 2008 14:10:02 +0000 (14:10 +0000)]
Fix for crashes with dma enabled using pci-6143.  Based on patch from
Terry Barnaby <terry1@beam.ltd.uk>, who also identified and located the
source of the problem.

16 years agoUsed DPRINTK() instead of rt_printk() in a few places to generate less
Ian Abbott [Tue, 25 Mar 2008 12:50:38 +0000 (12:50 +0000)]
Used DPRINTK() instead of rt_printk() in a few places to generate less
output on the kernel log by default.

16 years agoUsed comedi_pci_enable() and comedi_pci_disable().
Ian Abbott [Tue, 25 Mar 2008 12:42:38 +0000 (12:42 +0000)]
Used comedi_pci_enable() and comedi_pci_disable().

16 years agoRemoved commented-out variables.
Ian Abbott [Tue, 25 Mar 2008 12:36:00 +0000 (12:36 +0000)]
Removed commented-out variables.

16 years agoUpdated documentation comment and put it in a standard form.
Ian Abbott [Tue, 25 Mar 2008 12:27:53 +0000 (12:27 +0000)]
Updated documentation comment and put it in a standard form.

16 years agoApplied comedi_indent script to source.
Ian Abbott [Tue, 25 Mar 2008 12:10:13 +0000 (12:10 +0000)]
Applied comedi_indent script to source.

16 years agoAdded Advantech PCI-1723 driver by yonggang <rsmgnu at gmail dot com>.
Ian Abbott [Tue, 25 Mar 2008 11:56:07 +0000 (11:56 +0000)]
Added Advantech PCI-1723 driver by yonggang <rsmgnu at gmail dot com>.

16 years ago... and check that ai_mite_chan is not NULL after we have spinlock.
Frank Mori Hess [Fri, 21 Mar 2008 18:48:51 +0000 (18:48 +0000)]
... and check that ai_mite_chan is not NULL after we have spinlock.

16 years agoAdded missing spinlock around usage of devpriv->ai_mite_chan
Frank Mori Hess [Fri, 21 Mar 2008 18:45:23 +0000 (18:45 +0000)]
Added missing spinlock around usage of devpriv->ai_mite_chan

16 years agoFixed check for unspecified clock period for clock source NI_MIO_RTSI_CLOCK
Ian Abbott [Fri, 14 Mar 2008 15:31:22 +0000 (15:31 +0000)]
Fixed check for unspecified clock period for clock source NI_MIO_RTSI_CLOCK
in function ni_set_master_clock().  (Patch from Terry Barnaby of Beam Ltd.)

16 years agoPrevent dereference of NULL chanlist pointer in ai cmdtest leading to
Ian Abbott [Wed, 12 Mar 2008 13:21:58 +0000 (13:21 +0000)]
Prevent dereference of NULL chanlist pointer in ai cmdtest leading to
kernel Oops.

16 years agoSet SDF_CMD_READ subdevice flag if do_cmd and do_cmdtest are set.
Ian Abbott [Wed, 5 Mar 2008 14:14:01 +0000 (14:14 +0000)]
Set SDF_CMD_READ subdevice flag if do_cmd and do_cmdtest are set.
Only set read_subdev if do_cmd and do_cmdtest are set.
Don't set write_subdev as no subdevice supports write commands.

16 years agoAdded Fred Brooks (ni_daq_700 driver).
Ian Abbott [Thu, 21 Feb 2008 12:47:49 +0000 (12:47 +0000)]
Added Fred Brooks (ni_daq_700 driver).

16 years agoChanged subdev_700_insn to include the state of the output channels
Ian Abbott [Thu, 21 Feb 2008 12:36:10 +0000 (12:36 +0000)]
Changed subdev_700_insn to include the state of the output channels
(0 to 7) in the returned data.  This may be inaccurate unless the output
channels have been written at least once.

16 years agoChanged the name in the second entry of the boards array to "ni_daq_700"
Ian Abbott [Thu, 21 Feb 2008 12:26:24 +0000 (12:26 +0000)]
Changed the name in the second entry of the boards array to "ni_daq_700"
to match the driver name.  This is an alias of the first entry which has
the name "daqcard-700".

16 years agoRemoved spurious '#define _700_H'.
Ian Abbott [Thu, 21 Feb 2008 12:22:31 +0000 (12:22 +0000)]
Removed spurious '#define _700_H'.

16 years agoUpdated driver description using information from other comments.
Ian Abbott [Thu, 21 Feb 2008 12:20:53 +0000 (12:20 +0000)]
Updated driver description using information from other comments.

16 years agoRan source through comedi_indent script.
Ian Abbott [Thu, 21 Feb 2008 12:02:27 +0000 (12:02 +0000)]
Ran source through comedi_indent script.

16 years agoAdded NI DAQCard-700 DIO-only driver by fred brooks.
Ian Abbott [Thu, 21 Feb 2008 11:54:51 +0000 (11:54 +0000)]
Added NI DAQCard-700 DIO-only driver by fred brooks.

16 years agoApplied update to driver documentation section from jeremy theler:
Ian Abbott [Thu, 21 Feb 2008 11:21:47 +0000 (11:21 +0000)]
Applied update to driver documentation section from jeremy theler:
- corrected 'Devices' line
- updated status
- updated description and changelog.
I corrected the year in jeremy's updated 'Updated' line.

16 years agoAdd PCI bus/slot options.
Ian Abbott [Fri, 15 Feb 2008 10:57:25 +0000 (10:57 +0000)]
Add PCI bus/slot options.

16 years agoFixed spelling error "sucess"->"success".
Frank Mori Hess [Fri, 8 Feb 2008 19:03:07 +0000 (19:03 +0000)]
Fixed spelling error "sucess"->"success".

16 years agoforgotten to uncomment the debug macro. Soooory.
Bernd Porr [Tue, 5 Feb 2008 22:47:03 +0000 (22:47 +0000)]
forgotten to uncomment the debug macro. Soooory.

16 years agoSilly mistake in the frequency setting. Sent out the wrong variable
Bernd Porr [Tue, 5 Feb 2008 22:43:48 +0000 (22:43 +0000)]
Silly mistake in the frequency setting. Sent out the wrong variable
to the dux board so that the frequency was more or less a random choice.
Thanks for Sam for figuring that out.

16 years agoFor separate kernel source and build directories, allow the kernel build
Ian Abbott [Mon, 4 Feb 2008 16:47:54 +0000 (16:47 +0000)]
For separate kernel source and build directories, allow the kernel build
directory's Makefile to specify KERNELSRC using a relative path.
This avoids having to use the --with-kernelsrcdir option when configuring
Comedi for SuSE Linux's kernels.

16 years agoModified output to be tab-delimited (for easier parsing later into a
Frank Mori Hess [Wed, 30 Jan 2008 16:39:06 +0000 (16:39 +0000)]
Modified output to be tab-delimited (for easier parsing later into a
html table).

16 years agoregenerated ChangeLog with "cvs2cl -T" v0_7_76
Frank Mori Hess [Mon, 28 Jan 2008 21:09:42 +0000 (21:09 +0000)]
regenerated ChangeLog with "cvs2cl -T"

16 years agobumped version for 0.7.76 release.
Frank Mori Hess [Mon, 28 Jan 2008 20:51:14 +0000 (20:51 +0000)]
bumped version for 0.7.76 release.

16 years agoAllow generation of devices.txt and drivers.txt to work
Frank Mori Hess [Mon, 28 Jan 2008 20:04:24 +0000 (20:04 +0000)]
Allow generation of devices.txt and drivers.txt to work
when builddir != srcdir.

16 years agoSuppress some compiler warnings
Frank Mori Hess [Mon, 28 Jan 2008 20:03:04 +0000 (20:03 +0000)]
Suppress some compiler warnings

16 years agoReplaced an "if(0)" with an "#if 0".
Frank Mori Hess [Mon, 28 Jan 2008 19:32:30 +0000 (19:32 +0000)]
Replaced an "if(0)" with an "#if 0".

16 years agoFix bug in ni_pcidio_release_di_mite_channel() that prevented subsequent
Ian Abbott [Mon, 28 Jan 2008 13:54:16 +0000 (13:54 +0000)]
Fix bug in ni_pcidio_release_di_mite_channel() that prevented subsequent
commands working (it never set devpriv->di_mite_chan to NULL after calling
mite_release_channel()).

16 years agoCorrected number of channels for DO subdevice.
Ian Abbott [Wed, 16 Jan 2008 17:03:48 +0000 (17:03 +0000)]
Corrected number of channels for DO subdevice.

16 years agoIn comedi_do_insn:
Ian Abbott [Mon, 14 Jan 2008 18:05:35 +0000 (18:05 +0000)]
In comedi_do_insn:
For INSN_WAIT, make sure insn->n is exactly 1.
For subdevice instructions, if subdevice is unused, return -EIO.
For subdevice instructions, if chanspec is wrong, return -EINVAL.

16 years agoIn comedi_do_insn, #if'ed out the final check for return value of subdevice
Ian Abbott [Mon, 14 Jan 2008 17:59:31 +0000 (17:59 +0000)]
In comedi_do_insn, #if'ed out the final check for return value of subdevice
insn function matching insn.n.  Comedi documentation for userspace
comedi_do_insn allows a lower value to be returned and some drivers
blatently do so, particularly for configuration instructions.

Also added some XXX reminder comments for INSN_WAIT and INSN_CONFIG for
things that need to be fixed.

16 years agoCorrected test for INSN_WRITE data value exceeding maxdata. It failed on
Ian Abbott [Mon, 14 Jan 2008 12:26:16 +0000 (12:26 +0000)]
Corrected test for INSN_WRITE data value exceeding maxdata. It failed on
subdevices that used per-channel maxdata values (maxdata_list).

16 years agoApplied comedi_indent script.
Ian Abbott [Mon, 14 Jan 2008 12:13:26 +0000 (12:13 +0000)]
Applied comedi_indent script.

16 years agoAdded a proper PWM subdevice for comedi.
Bernd Porr [Sun, 13 Jan 2008 23:07:02 +0000 (23:07 +0000)]
Added a proper PWM subdevice for comedi.
PWM is started with INSN_CONFIG_ARM where the second argument
defines the time how long PWM will last. A zero indicates "forever".
PWM is stopped with INSN_CONFIG_DISARM. No further args.
The duty cycle is set via a comedi_data_write where maxdata defines
the 100% duty cycle.
The PWM period is set by INSN_CONFIG_PWM_SET_PERIOD where the second
argument is in nanoseconds, thus 1E9/frequency
INSN_CONFIG_PWM_GET_PERIOD retrieves the frequency which might have been
corrected by the driver
INSN_GET_PWM_STATUS queries if it's on or off
INSN_CONFIG_PWM_SET_H_BRIDGE allows the transmit the duty cycle with a polarity bit in the second argument.
See the usbdux driver and its PWM section.

16 years agoOnly set SRF_RT subdevice flag if comedi_switch_to_rt(dev) succeeds.
Ian Abbott [Mon, 7 Jan 2008 11:05:21 +0000 (11:05 +0000)]
Only set SRF_RT subdevice flag if comedi_switch_to_rt(dev) succeeds.

16 years agoFor COMEDI_DEVCONFIG ioctl, if argument is NULL, refuse to unconfigure the
Ian Abbott [Wed, 2 Jan 2008 17:41:47 +0000 (17:41 +0000)]
For COMEDI_DEVCONFIG ioctl, if argument is NULL, refuse to unconfigure the
device if any subdevices are busy or have mmap'ed buffers.  The errno is
EBUSY in this case.

16 years agoChanged read, write, poll, and mmap file operations to use the per-device
Ian Abbott [Wed, 2 Jan 2008 17:04:21 +0000 (17:04 +0000)]
Changed read, write, poll, and mmap file operations to use the per-device
mutex.  The mutex is released during read and write operations that block.

16 years agoAdded board entry for 6013.
Frank Mori Hess [Wed, 2 Jan 2008 02:17:43 +0000 (02:17 +0000)]
Added board entry for 6013.

17 years agoOnce the linux build directory has been determined ($LINUX_DIR), try and
Ian Abbott [Thu, 20 Dec 2007 15:12:22 +0000 (15:12 +0000)]
Once the linux build directory has been determined ($LINUX_DIR), try and
override the previous setting of the LINUX_KERNEL_RELEASE variable using
the release info from the Linux build directory.  Information comes from
the UTS_RELEASE C macro.  For kernel versions 2.6.18 and later this is
defined in include/linux/utsrelease.h.  For earlier kernel versions it is
defined in include/linux/version.h.

17 years agoSome changes for separate Linux source and build trees.
Ian Abbott [Mon, 17 Dec 2007 16:43:04 +0000 (16:43 +0000)]
Some changes for separate Linux source and build trees.
Add LINUX_SRC_DIR variable to point to Linux source tree (LINUX_DIR points
to the Linux build tree).  It can be set with a new --with-linuxsrcdir
option or determined automatically from the build tree.
Changed some configure tests to check the Linux source tree instead of the
build tree.  The affected tests are COMEDI_CHECK_PCMCIA_PROBE,
COMEDI_CHECK_LINUX_KBUILD and COMEDI_CHECK_HAVE_MUTEX_H.  The
COMEDI_CHECK_LINUX_KBUILD test has been simplified because it no longer
has to check for separate source and build trees.

17 years agoUse unlocked_ioctl file operation instead of ioctl if kernel supports it
Ian Abbott [Wed, 12 Dec 2007 14:55:14 +0000 (14:55 +0000)]
Use unlocked_ioctl file operation instead of ioctl if kernel supports it
and use a mutex in struct comedi_device.
Some parts of the driver still need to be changed to use the mutex.

17 years agoCheck for include/linux/mutex.h in kernel source.
Ian Abbott [Wed, 12 Dec 2007 14:51:57 +0000 (14:51 +0000)]
Check for include/linux/mutex.h in kernel source.

17 years agoAdded compatibility header for <linux/mutex.h>.
Ian Abbott [Wed, 12 Dec 2007 14:47:20 +0000 (14:47 +0000)]
Added compatibility header for <linux/mutex.h>.

17 years agoFor non-Kbuild make, don't build addi-data drivers that use floating point,
Ian Abbott [Wed, 12 Dec 2007 13:47:00 +0000 (13:47 +0000)]
For non-Kbuild make, don't build addi-data drivers that use floating point,
but include source in EXTRA_DIST.  (Kbuild make already skips these drivers.)

17 years agoCorrected type qualifiers for pc_DriverName in boardtype.
Ian Abbott [Wed, 12 Dec 2007 12:42:44 +0000 (12:42 +0000)]
Corrected type qualifiers for pc_DriverName in boardtype.

17 years agoRemoved #defines for types (now they're all in addi_common.h).
Ian Abbott [Wed, 12 Dec 2007 12:28:05 +0000 (12:28 +0000)]
Removed #defines for types (now they're all in addi_common.h).

17 years agoUse typedef instead of #define to define MS-Windows types. Add a few more
Ian Abbott [Wed, 12 Dec 2007 12:27:00 +0000 (12:27 +0000)]
Use typedef instead of #define to define MS-Windows types.  Add a few more
pointer types.

17 years agoInclude <linux/ioctl32.h> if using old-style register_ioctl32_conversion.
Ian Abbott [Wed, 12 Dec 2007 11:34:01 +0000 (11:34 +0000)]
Include <linux/ioctl32.h> if using old-style register_ioctl32_conversion.

17 years agoConverted initialization of board array to modern standard (indent does
Frank Mori Hess [Wed, 12 Dec 2007 03:12:55 +0000 (03:12 +0000)]
Converted initialization of board array to modern standard (indent does
a slightly less bad job of indenting it this way).

17 years agoFor read and write, check if command still running in non-blocking mode as well.
Ian Abbott [Wed, 5 Dec 2007 17:02:01 +0000 (17:02 +0000)]
For read and write, check if command still running in non-blocking mode as well.

17 years agoCheck for various errors such as subdevice in range and support for commands.
Ian Abbott [Wed, 5 Dec 2007 14:45:49 +0000 (14:45 +0000)]
Check for various errors such as subdevice in range and support for commands.
Use comedi_set_subdevice_runflags and comedi_get_subdevice_runflags when
checking/modifying SRF_RT runflag.

17 years agoIf comedi_switch_to_rt() is a macro it should stil have a return value.
Ian Abbott [Wed, 5 Dec 2007 14:41:47 +0000 (14:41 +0000)]
If comedi_switch_to_rt() is a macro it should stil have a return value.

17 years agoUse per-subdevice spin-lock instead of big_comedi_lock. Renamed existing
Ian Abbott [Wed, 5 Dec 2007 12:52:15 +0000 (12:52 +0000)]
Use per-subdevice spin-lock instead of big_comedi_lock.  Renamed existing
subdevice 'runflags_lock' to 'spin_lock' for more general use.  (Could have
used a separate spin-lock for locking/unlocking subdevices, but there
shouldn't be much contention for the existing spin-lock used for setting/
getting runflags.)

17 years agoDefine mmiowb() macro if necessary.
Ian Abbott [Tue, 4 Dec 2007 15:30:39 +0000 (15:30 +0000)]
Define mmiowb() macro if necessary.

17 years agoNo need to define kcalloc() compatibility function for kernel 2.6.9 onwards.
Ian Abbott [Tue, 4 Dec 2007 13:11:14 +0000 (13:11 +0000)]
No need to define kcalloc() compatibility function for kernel 2.6.9 onwards.
The kzalloc() compatibility function is still required for vanilla kernels
prior to 2.6.14, but some versions of RHEL4 2.6.9 kernel (e.g. 2.6.9-42)
already declare it, so use a macro to override it with our own version.

17 years agoExpanded documentation for the driver.
Ian Abbott [Mon, 3 Dec 2007 17:47:46 +0000 (17:47 +0000)]
Expanded documentation for the driver.

17 years agoReport error event when command stopped due to buffer overflow.
Ian Abbott [Mon, 3 Dec 2007 14:47:00 +0000 (14:47 +0000)]
Report error event when command stopped due to buffer overflow.

17 years agoAvoid setting s->async->inttrig to NULL in interrupt routine.
Ian Abbott [Mon, 3 Dec 2007 14:43:40 +0000 (14:43 +0000)]
Avoid setting s->async->inttrig to NULL in interrupt routine.

17 years agoAvoid setting s->async->inttrig to NULL in interrupt routine.
Ian Abbott [Mon, 3 Dec 2007 14:36:31 +0000 (14:36 +0000)]
Avoid setting s->async->inttrig to NULL in interrupt routine.

17 years agoFor AO command, if scan_begin_src is TRIG_INT and not using DAC FIFO, need
Ian Abbott [Mon, 3 Dec 2007 13:57:45 +0000 (13:57 +0000)]
For AO command, if scan_begin_src is TRIG_INT and not using DAC FIFO, need
to call comedi_event() in the inttrig function because it isn't being called
anywhere else.

17 years agoAvoid changing s->async->inttrig during an interrupt. In particular, do
Ian Abbott [Mon, 3 Dec 2007 13:31:49 +0000 (13:31 +0000)]
Avoid changing s->async->inttrig during an interrupt.  In particular, do
not set it to NULL when stopping command during interrupt.

17 years agoUse DAC FIFO if the card has one (PCI230+ hardware version 2).
Ian Abbott [Fri, 30 Nov 2007 18:37:59 +0000 (18:37 +0000)]
Use DAC FIFO if the card has one (PCI230+ hardware version 2).

17 years agoAdded enums for Amplicon DIO card clock and gate sources.
Ian Abbott [Fri, 30 Nov 2007 12:21:49 +0000 (12:21 +0000)]
Added enums for Amplicon DIO card clock and gate sources.

17 years agoFor AO command test step 3, return 3 if external trigger flags have been
Ian Abbott [Thu, 29 Nov 2007 15:49:31 +0000 (15:49 +0000)]
For AO command test step 3, return 3 if external trigger flags have been
corrected.

17 years agoWhen stopping AO command, only stop timer if using it
Ian Abbott [Wed, 28 Nov 2007 14:48:18 +0000 (14:48 +0000)]
When stopping AO command, only stop timer if using it
(scan_begin_src==TRIG_TIMER).

17 years agoRelease Z2-CT2 resource after AI command started if convert_src is neither
Ian Abbott [Wed, 28 Nov 2007 11:12:17 +0000 (11:12 +0000)]
Release Z2-CT2 resource after AI command started if convert_src is neither
TRIG_TIMER nor TRIG_INT.

17 years agoAvoid using software conversion trigger as it doesn't work very well for
Ian Abbott [Tue, 27 Nov 2007 16:43:51 +0000 (16:43 +0000)]
Avoid using software conversion trigger as it doesn't work very well for
differential mode on some versions of PCI230/260.  Use Z2 timer 2 output
instead and toggle the output in software to trigger a conversion.  Note
that the ADC busy bit only works for software triggers in non-FIFO mode,
so for AI INSN_READ, use the FIFO and the FIFO status bits to check when
the conversion is complete.

17 years agoRTAI support was broken in comedi-0.7.75 due to missing RTAI_VERSION_CODE
Ian Abbott [Tue, 27 Nov 2007 13:17:02 +0000 (13:17 +0000)]
RTAI support was broken in comedi-0.7.75 due to missing RTAI_VERSION_CODE
and RTAI_MANGLE_VERSION in comedi/drivers/comedi_rt_timer.c.
Added #include <rtai_version.h> to include/linux/comedi_rt.h to fix it.

17 years agoInsert delay after AI internal conversion trigger (convert_src==TRIG_INT)
Ian Abbott [Tue, 27 Nov 2007 12:52:33 +0000 (12:52 +0000)]
Insert delay after AI internal conversion trigger (convert_src==TRIG_INT)
so we don't trigger more often than the hardware is capable of.

17 years agoUse programmable ADC FIFO interrupt trigger level and ADC FIFO level
Ian Abbott [Mon, 26 Nov 2007 17:56:19 +0000 (17:56 +0000)]
Use programmable ADC FIFO interrupt trigger level and ADC FIFO level
registers on PCI230+/260+ to reduce number of interrupts required when
FIFO interrupt trigger level would otherwise be "trigger when not empty".