linux/drivers/staging/comedi
Ian Abbott 0cf55bbef2 staging: comedi: comedi_test: implement commands on AO subdevice
Implement COMEDI asynchronous commands on the fake analog output
subdevice.  This is useful for testing asynchronous commands in the
"write" direction when no real hardware is available.

A normal kernel timer is used to drive the command.  The new timer
expiry function `waveform_ao_timer()` handles whole "scans" at a time
according to the number of scan period that have elapsed since the last
scan.  Data for each channel in the scan is written to the internal
loopback array `devpriv->ao_loopbacks[]` and can be read back on the
analog input channels.  However, if several scan periods are outstanding
in the timer expiry function, only the latest available scan data is
written to the loopback array in order to save processing time.  The
expiry function also checks for underrun conditions, and checks for
normal termination of the asynchronous command when a "stop" scan count
is reached.

After the command is tested by `waveform_ao_cmdtest()` and set up by
`waveform_ao_cmd()`, it is not started until an internal trigger
function `waveform_ao_inttrig_start()` is called as a result of the user
performing an `INSN_INTTRIG` instruction on the subdevice.  The command
is stopped when the "cancel" handler `waveform_ao_cancel()` is called.
This may be due to the command terminating due to completion or an
error, or as a result of the user cancelling the command.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:58:36 +09:00
..
drivers staging: comedi: comedi_test: implement commands on AO subdevice 2015-10-29 08:58:36 +09:00
kcomedilib staging: comedi: kcomedilib: Fixed coding style issue 2015-09-12 18:24:38 -07:00
comedi_buf.c staging: comedi: add new comedi_buf_write_n_available() 2015-10-13 10:28:40 -07:00
comedi_compat32.c staging: comedi: fix cast warning in comedi_compat32.c 2015-07-14 18:21:15 -07:00
comedi_compat32.h staging: comedi: comedi_compat32.h: reformat copyright comment 2015-01-28 11:19:34 -08:00
comedi_fops.c staging: comedi: check for more errors for zero-length read 2015-10-13 10:29:48 -07:00
comedi_internal.h staging: comedi: add new comedi_buf_write_n_available() 2015-10-13 10:28:40 -07:00
comedi_pci.c staging: comedi: comedi_pci.c: Fix kernel-doc Return tags 2015-10-02 11:43:21 +02:00
comedi_pci.h staging: comedi: comedi_pci.h: move PCI stuff out of comedidev.h 2015-03-20 14:08:18 +01:00
comedi_pcmcia.c staging: comedi: comedi_pcmcia.c: improve function documentation 2015-10-02 11:43:21 +02:00
comedi_pcmcia.h staging: comedi: comedi_pcmcia.h: move PCMCIA stuff out of comedidev.h 2015-02-07 17:05:51 +08:00
comedi_usb.c staging: comedi: comedi_usb.c: improve function documentation 2015-10-02 11:43:21 +02:00
comedi_usb.h staging: comedi: comedi_usb.h: move USB stuff out of comedidev.h 2015-01-28 11:18:51 -08:00
comedi.h Drivers: staging: comedi: comedi: Fixed comment spelling error 2015-05-24 13:11:44 -07:00
comedidev.h staging: comedi: comedidev.h: spaces preferred around that '*' 2015-10-13 10:30:39 -07:00
comedilib.h
drivers.c staging: comedi: fix extreme case of comedi_nsamples_left() 2015-10-27 14:31:25 +09:00
Kconfig staging: comedi: aio_aio12_8: hookup 8254 counter/timer 2015-10-13 10:26:06 -07:00
Makefile staging: comedi: split out PCI support into new module 2014-11-07 09:24:33 -08:00
proc.c
range.c staging: comedi: improve comedi_check_chanlist() documentation 2015-08-05 11:55:44 -07:00
TODO