Frank Mori Hess [Thu, 26 Apr 2007 15:05:09 +0000 (15:05 +0000)]
Got rid of useless include of mite.h.
Frank Mori Hess [Thu, 26 Apr 2007 14:58:03 +0000 (14:58 +0000)]
Got rid of call to subdevice's buf_change callback which occurred after
device was detached. Small cleanup of duplicated code.
Frank Mori Hess [Thu, 26 Apr 2007 14:54:10 +0000 (14:54 +0000)]
Added support for a cmd_cleanup() callback on subdevices, which
is called when a command is finished. Will be used to release
mite DMA channels when no longer in use.
Frank Mori Hess [Thu, 19 Apr 2007 19:53:11 +0000 (19:53 +0000)]
Added spinlock to mite_struct for mite_alloc_channel() and
mite_free_channel().
Frank Mori Hess [Thu, 19 Apr 2007 19:41:27 +0000 (19:41 +0000)]
Made some changes to async buffer, to better accommodate output dma
(added read allocation). Tweaked memory barrier usage for async buffer
to try and improve its correctness. comedi_buf_munge() is now handled
entirely inside comedi_buf_write_free(). Added some helper functions
mite_sync_input_dma() and mite_sync_output_dma() for use in
driver interrupt handlers. Added beginnings of support for NI general
purpose counter input commands.
Frank Mori Hess [Thu, 19 Apr 2007 19:23:33 +0000 (19:23 +0000)]
Silenced warning from gcc 4.1.2
Frank Mori Hess [Thu, 19 Apr 2007 18:59:59 +0000 (18:59 +0000)]
Silenced gcc 4.1.2 compile warning.
Frank Mori Hess [Thu, 19 Apr 2007 17:18:17 +0000 (17:18 +0000)]
Fixed for warning produced by automake 1.10
Frank Mori Hess [Thu, 19 Apr 2007 15:15:32 +0000 (15:15 +0000)]
ignore errors from kernel's make modules in all-local, to
avoid failure of make install
on nfs filesystem with root_squash
Frank Mori Hess [Sun, 18 Mar 2007 14:46:32 +0000 (14:46 +0000)]
Fix from Navneet Kataria <nkataria@npcil.co.in> for the following
problem:
... when I initialize
the device using comedi_config command, the device's 1st and 9th relay
automatically goes to energize state.
Frank Mori Hess [Mon, 26 Feb 2007 17:23:49 +0000 (17:23 +0000)]
Added support for configuring dio direction on NI 660x boards through
subdevice 1. Also added support for selecting digital input filter
with INSN_CONFIG_ALT_FILTER.
Frank Mori Hess [Wed, 21 Feb 2007 03:23:27 +0000 (03:23 +0000)]
Bug fix from Edwin Steiner <edwin.steiner@gmx.net>:
The problem is that in ni_m_series_load_channelgain_list config_bits
is not reset to 0 in the loop over the channels.
Frank Mori Hess [Mon, 5 Feb 2007 04:04:56 +0000 (04:04 +0000)]
Only check if parse_insn returns a negative value.
Frank Mori Hess [Thu, 1 Feb 2007 01:28:59 +0000 (01:28 +0000)]
Counters should start at subdevice 2, not 1 (was blowing away the
dio subdevice).
Frank Mori Hess [Wed, 31 Jan 2007 03:13:55 +0000 (03:13 +0000)]
New driver from "Calin A. Culianu" <calin@ajvar.org>:
This driver adds support for the Winsystems PCM-MIO PC/104
based multifunction board. This board has 16 AI, 8 AO, and 48 DIO
channels. The driver is almost complete -- it is just missing
asynchronous mode for AI and AO. But synchronous mode works fine. There
is even IRQ support for the DIO lines (edge-triggered interrupts).
Frank Mori Hess [Wed, 24 Jan 2007 02:00:00 +0000 (02:00 +0000)]
Patch from "Calin A. Culianu" <calin@ajvar.org>:
A pet peeve of mine is that the two driver that I wrote, the pcmda12 and
pcmuio driver, format incorrectly when displayed on the comedi.org
"Supported Hardware" web page. This is because they are incorrectly
formatted in the driver's "Devices:" line. This patch fixes this so that
the Devices: line is now correctly formatted.
Frank Mori Hess [Fri, 12 Jan 2007 19:55:19 +0000 (19:55 +0000)]
Ported ni_660x.c to use counter support provided by ni_tio.c
Frank Mori Hess [Mon, 8 Jan 2007 21:42:20 +0000 (21:42 +0000)]
Fixed some breaks that were supposed to break out of switches. Fixed
setting of first gate source when choosing NI_GPCT_GATE_PIN_GATE_SELECT().
Frank Mori Hess [Mon, 8 Jan 2007 21:10:07 +0000 (21:10 +0000)]
Fixed NI_GPCT_CLOCK_SRC_SELECT_MASK to allow for PFI sources.
Frank Mori Hess [Mon, 8 Jan 2007 20:49:31 +0000 (20:49 +0000)]
fixed read of G_Status_Register for m-series.
Frank Mori Hess [Mon, 8 Jan 2007 15:09:37 +0000 (15:09 +0000)]
Ask board which load register will be used next, since it might have
changed since the last time it was set by the driver.
Frank Mori Hess [Fri, 5 Jan 2007 20:54:17 +0000 (20:54 +0000)]
Fixed reading of counters' hardware and software save registers.
Frank Mori Hess [Fri, 5 Jan 2007 20:38:31 +0000 (20:38 +0000)]
Ported ni_mio_common.c to use ni_tio.c for NI general-purpose counter
support. Have tested only counter in continuous pulse generation mode so
far (see comedilib/demo/gpct_pulse_generator.c which I will soon commit
to comedilib cvs).
Frank Mori Hess [Fri, 5 Jan 2007 20:35:52 +0000 (20:35 +0000)]
Changed value of NI_GPCT_DISABLED_GATE_SELECT so it plays nice with
CR_CHAN macro, which I used in ni_tio.c
Frank Mori Hess [Fri, 5 Jan 2007 15:25:43 +0000 (15:25 +0000)]
Renamed INSN_CONFIG_RESET_COUNT to more general INSN_CONFIG_RESET.
Made setting of count on ni general-purpose counters leave the
values of the load a/b registers, and the load source select
undisturbed.
Frank Mori Hess [Fri, 5 Jan 2007 14:19:39 +0000 (14:19 +0000)]
Added mode bit for selecting load a/b counter load sources on NI general-
purpose counters. Renamed a couple members of the ni_gpct_arm_source
enum. Added a few lines of documentation about some additional
INSN_CONFIG.
Frank Mori Hess [Fri, 29 Dec 2006 16:47:36 +0000 (16:47 +0000)]
use $(MAKE) instead of make. This fixes the use of the -jN option for
parallel compilation.
Frank Mori Hess [Wed, 20 Dec 2006 20:51:02 +0000 (20:51 +0000)]
Calculate clock period taking into account prescaling.
Frank Mori Hess [Wed, 20 Dec 2006 18:18:30 +0000 (18:18 +0000)]
Added declaration for ni_tio_init_counter()
Frank Mori Hess [Tue, 19 Dec 2006 15:47:13 +0000 (15:47 +0000)]
Added support for hardware arming of counters, and set
Gi_Synchronize_Gate_Bit in command reg.
Frank Mori Hess [Tue, 19 Dec 2006 14:19:25 +0000 (14:19 +0000)]
Added declaration of comedi_mark_buffer_written().
Frank Mori Hess [Tue, 19 Dec 2006 02:26:51 +0000 (02:26 +0000)]
Added missing export of comedi_mark_buffer_written symbol, as noted by
"Andreas Leuner" <al14@inf.tu-dresden.de>
Frank Mori Hess [Tue, 19 Dec 2006 02:20:58 +0000 (02:20 +0000)]
defines from comedi's config.h in the top-level comedi directory
are still used.
Frank Mori Hess [Fri, 15 Dec 2006 20:54:27 +0000 (20:54 +0000)]
Added support for x2 prescaling on ni general-purpose counters.
Frank Mori Hess [Fri, 15 Dec 2006 16:34:28 +0000 (16:34 +0000)]
Added INSN_CONFIG_RESET_COUNT
Frank Mori Hess [Thu, 14 Dec 2006 21:08:45 +0000 (21:08 +0000)]
Added ni_tio_init_counter(), and exported some symbols.
Frank Mori Hess [Thu, 14 Dec 2006 19:43:26 +0000 (19:43 +0000)]
Made setting of gate sources more uniform across different hardware
families.
Frank Mori Hess [Tue, 12 Dec 2006 17:39:55 +0000 (17:39 +0000)]
Fixed interrupt handler prototypes for all drivers when compiling
against 2.6.19 kernels.
Frank Mori Hess [Tue, 12 Dec 2006 15:14:17 +0000 (15:14 +0000)]
Added PT_REGS_ARG macro to deal with change to interrupt handler
prototype in kernel 2.6.19.
Frank Mori Hess [Mon, 11 Dec 2006 20:43:34 +0000 (20:43 +0000)]
Made setting of counter clock source more uniform across e-series,
m-series, and 660x boards.
Frank Mori Hess [Fri, 8 Dec 2006 16:53:38 +0000 (16:53 +0000)]
First pass at consistent support for NI general-purpose counters.
Will replace counter support in ni_mio_common.c and ni_660x.c.
Note quite done yet, but it compiles.
Frank Mori Hess [Fri, 8 Dec 2006 16:50:11 +0000 (16:50 +0000)]
Added additional field to INSN_CONFIG_SET/GET_GATE_SRC, to support
devices with multiple gate inputs (NI counters can have 2 gates).
Bernd Porr [Wed, 6 Dec 2006 23:57:23 +0000 (23:57 +0000)]
The flag SDF_CMD_READ was missing which gave the error number "-1" during async reads.
Frank Mori Hess [Wed, 6 Dec 2006 13:58:50 +0000 (13:58 +0000)]
Added missing include of linux/version.h
Bernd Porr [Tue, 5 Dec 2006 21:51:56 +0000 (21:51 +0000)]
Removed the boolean definition from the driver and moved it to stddef.h
Bernd Porr [Tue, 5 Dec 2006 21:50:37 +0000 (21:50 +0000)]
Moved the boolean definition from the driver files to stddef because
from 2.6.19 boolean is defined there aleady.
Bernd Porr [Tue, 5 Dec 2006 21:46:20 +0000 (21:46 +0000)]
From 2.6.19 config.h is no longer needed. Added an ifdef statement.
Bernd Porr [Mon, 4 Dec 2006 23:24:07 +0000 (23:24 +0000)]
Added external trigger support to the driver.
Added a define for 2.6.19 because the completion function is without register arguments (as was pre 2.6.0).
Changed the GPIF programming so that it does no longer loops through the idle state. Instead I use the first states to reset the counter for channels.
Bernd Porr [Mon, 4 Dec 2006 23:20:21 +0000 (23:20 +0000)]
From 2.6.19 the pointer to the completion function is (again) without the register argument. That's basically pre 2.6.0
Frank Mori Hess [Wed, 29 Nov 2006 15:31:03 +0000 (15:31 +0000)]
Minor update to documentation comments.
Frank Mori Hess [Mon, 20 Nov 2006 20:15:56 +0000 (20:15 +0000)]
Mite byte-swapping bits seem to be associated with device/memory
ports as opposed to being always 16 or 32 bit swaps.
Frank Mori Hess [Mon, 20 Nov 2006 19:41:51 +0000 (19:41 +0000)]
Fixed possibile failures to decrement module use count on errors
(one was bug I probably introduced recently).
Frank Mori Hess [Mon, 20 Nov 2006 16:37:21 +0000 (16:37 +0000)]
Differentiate between 622x, 625x, and 628x m-series boards. Fix adc reset
for 625x boards, based on example code from ni (untested on hardware).
Fix polarity of AI_CONVERT output for 622x boards, based on ni
example code. Do 32 bit pci transfers on analog output dma, now that
the sample ordering has been resolved through byte-swapping bits
in mite chip. Use external clock (when configured) for timebase 3
too (I believe timebase 3 is the 80 MHz clock).
Frank Mori Hess [Fri, 17 Nov 2006 16:07:51 +0000 (16:07 +0000)]
Figured out what a couple bits in the mite channel control register
do (byte swapping). Used them to make 32 bit pci transfers to
16 bit analog outputs practical.
Frank Mori Hess [Fri, 17 Nov 2006 14:03:42 +0000 (14:03 +0000)]
Don't assume class_device has a devt member.
Frank Mori Hess [Thu, 16 Nov 2006 02:10:35 +0000 (02:10 +0000)]
Changed some ad8804 caldac types to ad8804_debug
Frank Mori Hess [Wed, 15 Nov 2006 21:25:28 +0000 (21:25 +0000)]
Added support for generating a seperate device file for each
subdevice that supports commands. Subdevices need to indicate
which directions they support commands in with the new subdevice
flags SDF_CMD_READ and SDF_CMD_WRITE. Breaks compatibility
with 2.4 kernels. Currently, only 8-bit minor numbers are
used, limiting the maximum subdevice to 15. This should
be easily changeable once more distros support 20-bit
minor numbers.
Ian Abbott [Mon, 13 Nov 2006 14:11:52 +0000 (14:11 +0000)]
Replaced deprecated use of check_region().
Ian Abbott [Mon, 13 Nov 2006 14:06:57 +0000 (14:06 +0000)]
Fixed some C++-isms: mixed declarations and code.
Frank Mori Hess [Thu, 9 Nov 2006 18:12:35 +0000 (18:12 +0000)]
Fixed oops caused by my giving comedi_driver.board_name a well-defined
type. Fix and bug report was from from sinkin <jinzhucheng@tom.com>.
Frank Mori Hess [Thu, 9 Nov 2006 17:38:19 +0000 (17:38 +0000)]
Added dev_t to comedi_subdevice in preparation for adding a device
file for each streaming subdevice. Got rid of unused options array
from comedi_device.
Frank Mori Hess [Tue, 7 Nov 2006 15:46:51 +0000 (15:46 +0000)]
Added init of ai static control reg for m series.
Frank Mori Hess [Tue, 7 Nov 2006 00:04:12 +0000 (00:04 +0000)]
Updated comment about dma transfer width.
Frank Mori Hess [Mon, 6 Nov 2006 21:10:10 +0000 (21:10 +0000)]
Blah, doing 32 pci transfers causes the channel order to get swapped,
switching back to 16 bit.
Frank Mori Hess [Sat, 4 Nov 2006 02:39:46 +0000 (02:39 +0000)]
Do 32 bit dma transfers for analog output.
Frank Mori Hess [Thu, 2 Nov 2006 19:34:23 +0000 (19:34 +0000)]
Added some commented-out code for measuring speed of dma transfers
for ao.
Frank Mori Hess [Thu, 2 Nov 2006 03:22:10 +0000 (03:22 +0000)]
Fixed decode of write post fifo depth.
Frank Mori Hess [Wed, 1 Nov 2006 20:56:38 +0000 (20:56 +0000)]
Added a couple more (unused_) bit definitions.
Frank Mori Hess [Wed, 1 Nov 2006 20:55:52 +0000 (20:55 +0000)]
put COMEDI_INPUT, etc. in their own enum.
Frank Mori Hess [Wed, 1 Nov 2006 19:52:47 +0000 (19:52 +0000)]
fixed hosing of ao_mode2 register.
Frank Mori Hess [Fri, 27 Oct 2006 17:19:14 +0000 (17:19 +0000)]
Set AO_Number_Of_DAC_Packages bit for m-series.
Frank Mori Hess [Fri, 27 Oct 2006 17:18:51 +0000 (17:18 +0000)]
check length of INSN_CONFIG_ANALOG_TRIG
Frank Mori Hess [Fri, 27 Oct 2006 15:46:04 +0000 (15:46 +0000)]
Fixed setting of MSeries_AO_Update_Timed_Bit in ao commands
for m-series.
Frank Mori Hess [Thu, 26 Oct 2006 21:04:35 +0000 (21:04 +0000)]
Fixed waveform analog output on m-series, which I found was only working
for doing a single channel output on channel 0.
Frank Mori Hess [Wed, 25 Oct 2006 15:33:06 +0000 (15:33 +0000)]
Only try to initialize pfi output select registers if it's an m-series
board. Initialize pfi do register.
Frank Mori Hess [Tue, 24 Oct 2006 20:46:19 +0000 (20:46 +0000)]
Initialize pfi output select registers.
Frank Mori Hess [Tue, 24 Oct 2006 20:29:47 +0000 (20:29 +0000)]
Implemented insn_bits for PFI subdevice with m-series boards.
Frank Mori Hess [Tue, 24 Oct 2006 20:29:07 +0000 (20:29 +0000)]
Check length of INSN_BITS instructions in core.
Frank Mori Hess [Tue, 24 Oct 2006 18:52:22 +0000 (18:52 +0000)]
Added support for configuring pfi routing on m-series boards with
INSN_CONFIG_SET_ROUTING.
Frank Mori Hess [Tue, 24 Oct 2006 15:26:51 +0000 (15:26 +0000)]
m-series has 16 pfi lines instead of 10.
Frank Mori Hess [Tue, 24 Oct 2006 15:21:46 +0000 (15:21 +0000)]
Fixed search for best pll multiplier/divisor
Frank Mori Hess [Tue, 24 Oct 2006 15:06:10 +0000 (15:06 +0000)]
Added NI_EXT_PFI() and NI_EXT_RTSI() helper functions to comedi.h
for specifying pfi/rtsi lines as external trigger sources. Tweaked
a couple names to match ni stc documentation more closely.
Frank Mori Hess [Tue, 24 Oct 2006 15:03:39 +0000 (15:03 +0000)]
Minor updates to documentation comment block.
Frank Mori Hess [Mon, 23 Oct 2006 19:33:24 +0000 (19:33 +0000)]
Added support for changing routing of signals to RTSI pins. Fixed
various bugs in syncronization to external clock sources.
Bernd Porr [Sat, 21 Oct 2006 22:54:30 +0000 (22:54 +0000)]
Fixed two small bugs Ian Abbott pointed out. Ian Wrote:
The first one is just a tiny mistake in usbduxfast_ai_cmdtest():
/* step 3: make sure arguments are trivially compatible */
if(cmd->start_arg == TRIG_NOW && cmd->start_arg != 0)
should be:
if(cmd->start_src == TRIG_NOW && cmd->start_arg != 0)
The other one is a mismatch between cmdtest and cmd. cmdtest checks
start_src==TRIG_NOW or start_src==TRIG_EXT, but cmd checks
start_src==TRIG_NOW and otherwise assumes start_src==TRIG_INT.
Frank Mori Hess [Fri, 20 Oct 2006 16:15:34 +0000 (16:15 +0000)]
Added missing offsets for RTSI register on m-series
Frank Mori Hess [Fri, 20 Oct 2006 15:31:21 +0000 (15:31 +0000)]
Added support for INSN_CONFIG_GET_CLOCK_SRC
Frank Mori Hess [Thu, 19 Oct 2006 21:06:18 +0000 (21:06 +0000)]
Added support for configuring external clock sources on ni mio boards,
including using the PLL on m-series boards.
Frank Mori Hess [Thu, 19 Oct 2006 20:56:40 +0000 (20:56 +0000)]
Added some more data length checks for config instructions to
comedi_fops.c
Frank Mori Hess [Wed, 18 Oct 2006 23:01:27 +0000 (23:01 +0000)]
fixed max PLL divisor/multiplier
Frank Mori Hess [Wed, 18 Oct 2006 19:24:10 +0000 (19:24 +0000)]
Added some bit definitions to support the external reference clock driven
phased-locked loop.
Frank Mori Hess [Wed, 18 Oct 2006 14:32:32 +0000 (14:32 +0000)]
Replaced a bunch of printk with RT-safe rt_printk
Frank Mori Hess [Wed, 18 Oct 2006 13:01:00 +0000 (13:01 +0000)]
Added missing pci device ids using values provided by Tim Ousley
<tim.ousley@ni.com>
Frank Mori Hess [Tue, 17 Oct 2006 19:16:56 +0000 (19:16 +0000)]
Put in some guesses as to whether various boards should have their
outputs inverted.
Frank Mori Hess [Tue, 17 Oct 2006 17:21:18 +0000 (17:21 +0000)]
Reworked INSN_BITS to support dio subdevices with > 32 channels
by specifying a base channel in the insn.chanspec.
Frank Mori Hess [Tue, 17 Oct 2006 16:11:35 +0000 (16:11 +0000)]
Fixed insn_rw_emulate_bits() for reads when channel is >= 32. I don't
like this new scheme, instead I think I'm going support >= 32 dio channels
by making the insn chanspec specify a base channel for the dio bitmask.
Frank Mori Hess [Tue, 17 Oct 2006 15:37:50 +0000 (15:37 +0000)]
Fixed reversal of input/output when configuring dio directions. Fixed
problems with reads and writes I created with earlier work.
Frank Mori Hess [Tue, 17 Oct 2006 15:36:37 +0000 (15:36 +0000)]
Made insn_rw_emulate_bits() work for dio subdevice with more than
32 channels (ni_65xx).
Frank Mori Hess [Mon, 16 Oct 2006 21:01:20 +0000 (21:01 +0000)]
Added support for 6509, and other boards in family. Will test
tommorrow.
Frank Mori Hess [Mon, 16 Oct 2006 19:05:55 +0000 (19:05 +0000)]
Gave board_name member of comedi_driver_struct a well-defined type.
Added const qualifier to some char*.