comedilib.git
12 years agodoc/comedilib_html_config.xsl: Use numbered sections.
Ian Abbott [Thu, 10 May 2012 13:33:33 +0000 (14:33 +0100)]
doc/comedilib_html_config.xsl: Use numbered sections.

Change DocBook XSL parameters for HTML output to use numbered sections
(like it was before we switched from SGML to XML) and to use just the
numbers in cross references, rather than number and/or title.

12 years agodoc/intro.xml: Replace a link to figure 1 with an xref.
Ian Abbott [Thu, 10 May 2012 13:14:56 +0000 (14:14 +0100)]
doc/intro.xml: Replace a link to figure 1 with an xref.

12 years agodemo/python/mmap.py: Fix buffer wraparound bug.
Ian Abbott [Thu, 10 May 2012 12:49:57 +0000 (13:49 +0100)]
demo/python/mmap.py: Fix buffer wraparound bug.

Fix bug reported by Ross Williamson where the code does not deal with
buffer wraparound within a chunk of data.

12 years agodoc/other.xml: Add extra details about range and aref.
Ian Abbott [Wed, 9 May 2012 17:41:51 +0000 (18:41 +0100)]
doc/other.xml: Add extra details about range and aref.

Add extra detail to the section on acquisition functions about the
range and aref parameters, and describe the comedi_range type.

The whole section is still a bit higgledy-piggledy and could do with
some rearrangement one day!

12 years agodoc/other.xml: Small DocBook mark-up fix.
Ian Abbott [Wed, 9 May 2012 16:40:34 +0000 (17:40 +0100)]
doc/other.xml: Small DocBook mark-up fix.

Use proper mark-up for sqrt function in slowly varying inputs section.

12 years agodoc/comedilib_dblatex_config.xsl: Set function.parens to "1".
Ian Abbott [Wed, 9 May 2012 16:28:58 +0000 (17:28 +0100)]
doc/comedilib_dblatex_config.xsl: Set function.parens to "1".

Persuades dblatex to output parentheses for all the <function> tags,
even those without <parameter> tags inside.

12 years agodoc/comedilib_html_config.xsl: Set function.parens to "1".
Ian Abbott [Wed, 9 May 2012 16:22:31 +0000 (17:22 +0100)]
doc/comedilib_html_config.xsl: Set function.parens to "1".

This makes sure the HTML output for
<function>foo<parameter>bar</parameter><parameter>baz</parameter></function>
includes parentheses, although it doesn't seem to add empty parentheses
after a plain <function>foo</function> which perhaps it should.

12 years agodoc/reference.xml: Added CR_PACK_FLAGS()
Ian Abbott [Wed, 9 May 2012 16:12:23 +0000 (17:12 +0100)]
doc/reference.xml: Added CR_PACK_FLAGS()

Added description of CR_PACK_FLAGS() macro and the various flag bits.

12 years agodoc/glossary.xml: A few DocBook mark-up changes.
Ian Abbott [Wed, 9 May 2012 15:05:02 +0000 (16:05 +0100)]
doc/glossary.xml: A few DocBook mark-up changes.

12 years agodoc/driverwriting.xml: Various changes.
Ian Abbott [Wed, 9 May 2012 14:50:17 +0000 (15:50 +0100)]
doc/driverwriting.xml: Various changes.

Some DocBook mark-up changes.  Also avoided absolute path-names for
sources as people tend to put them in different places!  Also changed
instructions for submitting drivers for review.

12 years agodoc/extensions_funcref.txt: Some DocBook mark-up changes.
Ian Abbott [Wed, 9 May 2012 13:45:18 +0000 (14:45 +0100)]
doc/extensions_funcref.txt: Some DocBook mark-up changes.

12 years agodoc/error_funcref.txt: Some DocBook mark-up changes.
Ian Abbott [Wed, 9 May 2012 13:16:23 +0000 (14:16 +0100)]
doc/error_funcref.txt: Some DocBook mark-up changes.

12 years agodoc/dio_funcref.txt: Some DocBook mark-up changes.
Ian Abbott [Wed, 9 May 2012 11:32:05 +0000 (12:32 +0100)]
doc/dio_funcref.txt: Some DocBook mark-up changes.

12 years agodoc/deprecated_funcref.txt: Some DocBook mark-up changes.
Ian Abbott [Tue, 8 May 2012 17:44:48 +0000 (18:44 +0100)]
doc/deprecated_funcref.txt: Some DocBook mark-up changes.

12 years agodoc/calibration_funcref.txt: Some DocBook mark-up changes.
Ian Abbott [Tue, 8 May 2012 17:08:56 +0000 (18:08 +0100)]
doc/calibration_funcref.txt: Some DocBook mark-up changes.

12 years agodoc/command_funcref.txt: Some DocBook mark-up changes.
Ian Abbott [Tue, 8 May 2012 16:08:16 +0000 (17:08 +0100)]
doc/command_funcref.txt: Some DocBook mark-up changes.

12 years agodoc/funcref: Some DocBook mark-up changes.
Ian Abbott [Tue, 8 May 2012 15:51:49 +0000 (16:51 +0100)]
doc/funcref: Some DocBook mark-up changes.

12 years agodoc/install.xml: Fixed a link.
Ian Abbott [Tue, 8 May 2012 13:12:11 +0000 (14:12 +0100)]
doc/install.xml: Fixed a link.

12 years agodoc/reference.xml: Minor change.
Ian Abbott [Tue, 8 May 2012 13:04:55 +0000 (14:04 +0100)]
doc/reference.xml: Minor change.

Used a proper cross reference to driver structures.

12 years agodoc/other.xml: More DocBook mark-up changes.
Ian Abbott [Tue, 8 May 2012 12:58:27 +0000 (13:58 +0100)]
doc/other.xml: More DocBook mark-up changes.

More changes, mostly adding <structfield> tags.

12 years agodoc/comedilib.ent: Got rid of a couple of redundant entities.
Ian Abbott [Tue, 8 May 2012 11:25:28 +0000 (12:25 +0100)]
doc/comedilib.ent: Got rid of a couple of redundant entities.

Got rid of the 'hellip' and 'uuml' entities in favour of predefined
versions of these entities.

12 years agodoc/install.xml: A few DocBook mark-up changes.
Ian Abbott [Tue, 8 May 2012 11:11:55 +0000 (12:11 +0100)]
doc/install.xml: A few DocBook mark-up changes.

12 years agodoc/tutorial.xml: A few DocBook mark-up changes.
Ian Abbott [Tue, 8 May 2012 10:35:22 +0000 (11:35 +0100)]
doc/tutorial.xml: A few DocBook mark-up changes.

12 years agodoc/other.xml, reference.xml: Slowly varying inputs and comedi triggers
Ian Abbott [Fri, 4 May 2012 17:45:33 +0000 (18:45 +0100)]
doc/other.xml, reference.xml: Slowly varying inputs and comedi triggers

Mention that the stuff that relies on the COMEDI_TRIG ioctl, including
the slowly varying input (comedi_sv_...) functions no longer work with
current versions of the Comedi kernel layer.

12 years agodoc/reference.xml: Improve description of comedi_insnlist...
Ian Abbott [Fri, 4 May 2012 17:29:47 +0000 (18:29 +0100)]
doc/reference.xml: Improve description of comedi_insnlist...

... by adding a link to the comedi_do_insnlist function.

12 years agodoc/reference.xml: Removed some comedilib internals.
Ian Abbott [Fri, 4 May 2012 17:20:42 +0000 (18:20 +0100)]
doc/reference.xml: Removed some comedilib internals.

Removed subdevice_struct as it is internal to comedilib.  Removed
struct comedi_t_struct, leaving only the comedi_t typedef as
applications only see it as a pointer to an opaque, incomplete type.

12 years agodoc/reference.xml: More DocBook mark-up changes.
Ian Abbott [Fri, 4 May 2012 17:10:55 +0000 (18:10 +0100)]
doc/reference.xml: More DocBook mark-up changes.

12 years agodoc: Use a stylesheet for dblatex
Ian Abbott [Fri, 4 May 2012 15:32:35 +0000 (16:32 +0100)]
doc: Use a stylesheet for dblatex

Add comedilib_dblatex_config.xsl stylesheet and pass it to dblatex when
producing PDF output.  The current version of the stylesheet doesn't
make much difference to the output, but it's somewhere we can put stuff
later.

We probably want to do something similar for the other PDF backends, but
those are currently broken anyway.

12 years agodoc/other.xml: Moved a few tags around and minor changes.
Ian Abbott [Thu, 3 May 2012 18:56:59 +0000 (19:56 +0100)]
doc/other.xml: Moved a few tags around and minor changes.

Moved <link> tags inside <function>, <type>, <constant> etc. tags so
fonts stay a bit more consistent.

12 years agoMerge branch 'master' of git://comedi.org/git/comedi/comedilib
Ian Abbott [Thu, 3 May 2012 12:06:46 +0000 (13:06 +0100)]
Merge branch 'master' of git://comedi.org/git/comedi/comedilib

12 years agoRemoved a para from the section about proc which mentioned an NI
Bernd Porr [Thu, 3 May 2012 01:11:14 +0000 (02:11 +0100)]
Removed a para from the section about proc which mentioned an NI
card but that's now the dux board from above actually.

12 years agoJust spotted that the documentation also talks about board_info.
Bernd Porr [Thu, 3 May 2012 01:07:30 +0000 (02:07 +0100)]
Just spotted that the documentation also talks about board_info.
I've updated it as well: explained the new command comedi_board_info.

12 years agoAdded a couple of sentences about async acquisition and the
Bernd Porr [Thu, 3 May 2012 00:24:22 +0000 (01:24 +0100)]
Added a couple of sentences about async acquisition and the
two modes cards do it and then mentioned our new board_info.

12 years agoChanged some of the descriptions for the SDF flags which were
Bernd Porr [Thu, 3 May 2012 00:03:16 +0000 (01:03 +0100)]
Changed some of the descriptions for the SDF flags which were
a bit misleading.

12 years agoJust what I said in the git log is now also actually in the man page
Bernd Porr [Wed, 2 May 2012 23:52:13 +0000 (00:52 +0100)]
Just what I said in the git log is now also actually in the man page
namely that the frequency option is only there for debugging.

12 years agoAdded comedi_board_info which has been inspired by the original
Bernd Porr [Wed, 2 May 2012 23:39:04 +0000 (00:39 +0100)]
Added comedi_board_info which has been inspired by the original
info in the demo directory. I've made it a bit more verbose
and also took into account that now the generic_timed command
takes more than one channel so that a user can experiment which
sampling rates are possible with different channel numbers.
I've also added an option to set the sampling rate for the generic_timed
command. That sould actually not be needed but I'm sure there
are drivers out there which do not correct the sampling rate
downwards automatically.

12 years agoAdded info that '-n' is used to select the waveform.
Bernd Porr [Wed, 2 May 2012 17:40:07 +0000 (18:40 +0100)]
Added info that '-n' is used to select the waveform.

12 years agoMerge branch 'master' of ssh://comedi.org/git/comedi/comedilib
Bernd Porr [Wed, 2 May 2012 16:59:46 +0000 (17:59 +0100)]
Merge branch 'master' of ssh://comedi.org/git/comedi/comedilib

12 years agoCreated a PWM demo using the newly introduced defines to
Bernd Porr [Wed, 2 May 2012 16:58:15 +0000 (17:58 +0100)]
Created a PWM demo using the newly introduced defines to
manipulate PWM frequency.

12 years agodoc/other.xml: More fiddling about.
Ian Abbott [Wed, 2 May 2012 14:47:59 +0000 (15:47 +0100)]
doc/other.xml: More fiddling about.

More documentation tidy-ups.  I'll probably get bored eventually!

12 years agodoc/comedilib.xml: Add myself (Ian Abbott) to list of authors.
Ian Abbott [Wed, 2 May 2012 12:04:24 +0000 (13:04 +0100)]
doc/comedilib.xml: Add myself (Ian Abbott) to list of authors.

12 years agodoc/tutorial.xml: Fix a broken link.
Ian Abbott [Wed, 2 May 2012 12:01:41 +0000 (13:01 +0100)]
doc/tutorial.xml: Fix a broken link.

12 years agodoc/other.xml: Use comedi_dio_bitfield2 instead of comedi_dio_bitfield.
Ian Abbott [Wed, 2 May 2012 11:54:46 +0000 (12:54 +0100)]
doc/other.xml: Use comedi_dio_bitfield2 instead of comedi_dio_bitfield.

Rework text to use comedi_dio_bitfield2 as comedi_dio_bitfield is marked
as deprecated elsewhere in the document.

12 years agoI've added a bit more "meat" to the asynchronous acquisition section
Bernd Porr [Tue, 1 May 2012 18:41:38 +0000 (19:41 +0100)]
I've added a bit more "meat" to the asynchronous acquisition section
and added myself to the authors section.

12 years agoconfigure: Avoid PDF generation by default if don't have dblatex
Ian Abbott [Tue, 1 May 2012 17:03:57 +0000 (18:03 +0100)]
configure: Avoid PDF generation by default if don't have dblatex

Changed handling of --with-pdf-backend[=yes] to avoid picking the default
xmlto backend for PDF generation because it's broken.

The default xmlto backend for PDF generation can still be selected using
--with-pdf-backend=default if you really want to try it.

12 years agodoc/funcref: Added missing comedi_data_read_n
Ian Abbott [Tue, 1 May 2012 16:42:15 +0000 (17:42 +0100)]
doc/funcref: Added missing comedi_data_read_n

There was a broken link to the comedi_data_read_n function from
elsewhere, so we'd better add a section for it.

12 years agodoc: Use ansi style funcsynopsis for html output.
Ian Abbott [Tue, 1 May 2012 16:14:27 +0000 (17:14 +0100)]
doc: Use ansi style funcsynopsis for html output.

Set XSL parameter "funcsynopsis.style" to "ansi" in the XSL stylesheet
used for HTML output (comedilib_html_config.xsl).

12 years agodoc/mkref: Add some refmiscinfo for man pages
Ian Abbott [Tue, 1 May 2012 15:54:39 +0000 (16:54 +0100)]
doc/mkref: Add some refmiscinfo for man pages

Make the man pages a bit neater.

12 years agodoc/other.xml: Some DocBook markup changes.
Ian Abbott [Tue, 1 May 2012 14:42:07 +0000 (15:42 +0100)]
doc/other.xml: Some DocBook markup changes.

12 years agodoc: A few whitespace tweaks in program listings
Ian Abbott [Tue, 1 May 2012 11:51:08 +0000 (12:51 +0100)]
doc: A few whitespace tweaks in program listings

12 years agodoc/other.xml: Replaced simplelists
Ian Abbott [Tue, 1 May 2012 10:48:46 +0000 (11:48 +0100)]
doc/other.xml: Replaced simplelists

Replaced some simplelists with variablelists to fix some dblatex layout
problems.

12 years agoI've updated the manual in the section configuration and
Bernd Porr [Fri, 27 Apr 2012 00:37:33 +0000 (01:37 +0100)]
I've updated the manual in the section configuration and
also updated the tutorial. I've simplified the tut2.c
by using comedi2phys instead of comedi2physical. The use of
polynomials as a 2nd comedi program is a bit too difficult
for a novice and might deter the user to dig deeper into
the coding. Also, I've added tut3.c which is a stripped
down version of cmd.c and of that again the relevant lines
for the handbook to save space.

12 years agoRemoved old hotplug install which is no longer used at all and
Bernd Porr [Thu, 26 Apr 2012 22:24:50 +0000 (23:24 +0100)]
Removed old hotplug install which is no longer used at all and
just left udev as the only hotplug mechanism. I've also added
an option to disable the installation of the firmware. This
is useful for debian or ubuntu packages where the firmware
is now provided by a package accompanying the staging kernel.
All usbdux files are included in the kernel firmware packages.
Package maintainers should use the --disable-firmware option.

12 years agodoc/other.xml: Make table of configuration instructions less ugly.
Ian Abbott [Wed, 25 Apr 2012 17:34:54 +0000 (18:34 +0100)]
doc/other.xml: Make table of configuration instructions less ugly.

The PDF output of the table of configurations was awful.  Fiddled with
the column widths a bit and simplified the layout "Meanings of data[1],..."
column to allow it to wrap.

12 years agoconfigure: Allow choice of backend for PDF generation.
Ian Abbott [Wed, 25 Apr 2012 16:14:16 +0000 (17:14 +0100)]
configure: Allow choice of backend for PDF generation.

Add --with-pdf-backend=[yes|no|dblatex|fop|default] option which
defaults to "yes".  This controls the option passed to 'xmlto' to
generate PDFs.

If set to "yes" (the default) it looks for 'dblatex' and uses it as the
backend for 'xmlto' if found, otherwise 'xmlto' will use the default
backend.

If set to "no" (same as --without-pdf-backend), PDF generation is
disabled.

If set to "dblatex" it looks for 'dblatex' and uses it as the backend
for 'xmlto' if found, otherwise PDF generation is disabled.

If set to "fop" it looks for 'fop' and uses it as the backend
for 'xmlto' if found, otherwise PDF generation is disabled.

If set to "default", 'xmlto' will use the default backend.

12 years agodoc/drivers.txt: Rebuilt from comedi
Ian Abbott [Mon, 23 Apr 2012 17:12:41 +0000 (18:12 +0100)]
doc/drivers.txt: Rebuilt from comedi

Rebuilt "doc/drivers.txt" using "make Documentation/comedi/drivers.txt"
in the Comedi package.  Note: this scans the driver sources included
with the comedi.org Comedi package, not the Linux "staging" Comedi
sources, so some newer, staging-only drivers are missing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agodoc/Makefile.am: Create directory for pdf output
Ian Abbott [Mon, 23 Apr 2012 16:52:06 +0000 (17:52 +0100)]
doc/Makefile.am: Create directory for pdf output

dblatex is passed the option `-o $(srcdir)/pdf`, but if this directory
does not exist, the PDF file is created with the name 'pdf' in
$(srcdir).  Make the directory so that the -o option treats the
specified name as an output directory instead of an output filename.

12 years agoetc/hotplug/usbduxsigma: Remove Makefile and Makefile.in ...
Ian Abbott [Mon, 23 Apr 2012 16:29:51 +0000 (17:29 +0100)]
etc/hotplug/usbduxsigma: Remove Makefile and Makefile.in ...

... but keep Makefile.am of course!

12 years agoUpdated usbdux firmware files. The udev hotplug mechanism
Bernd Porr [Mon, 23 Apr 2012 13:03:12 +0000 (14:03 +0100)]
Updated usbdux firmware files. The udev hotplug mechanism
now takes binary files and no longer hex files. Also
added the firmware for usbduxsigma.

12 years agoFixed an issue reported by Graeme Hattan that the udev
Bernd Porr [Mon, 23 Apr 2012 12:15:03 +0000 (13:15 +0100)]
Fixed an issue reported by Graeme Hattan that the udev
rules were installed in the etc directory and not the lib.
See also:
http://lintian.debian.org/tags/udev-rule-in-etc.html
./configure --with-udev-hotplug=/lib places now all
files in /lib. The scripts were wrongly prefixed with the
sysconf directory which is /etc but should be /lib.
The directory is now also taken from --with-udev-hotplug=/lib.

12 years agoFixed a path issue with comedilib.pdf. Got correctly
Bernd Porr [Mon, 23 Apr 2012 11:43:04 +0000 (12:43 +0100)]
Fixed a path issue with comedilib.pdf. Got correctly
saved into the pdf subfolder but install exprected
it in the doc folder.

12 years agoRemoved two scripts which are no longer used by hotplug.
Bernd Porr [Mon, 23 Apr 2012 11:28:13 +0000 (12:28 +0100)]
Removed two scripts which are no longer used by hotplug.
In the early udev days the firmware had to be uploaded
by comedi_config. However now the driver requests the
firmware by itself and there is no need to have dedicated
scripts for every kernel module in udev.

12 years agoautomake now checks for dblatex and the pdf version
Bernd Porr [Mon, 23 Apr 2012 11:22:16 +0000 (12:22 +0100)]
automake now checks for dblatex and the pdf version
of the comedi manual is now generated

12 years agoComedilib.pdf can now be generated with
Bernd Porr [Sun, 22 Apr 2012 23:23:03 +0000 (00:23 +0100)]
Comedilib.pdf can now be generated with
dblatex -t pdf ./comedilib.xml

There were two major issues in the comedilb.xml:
1) there were too many nested sections so that
   latex ran out of sub-sub-sub-sub-sections.
2) A section needs a title and can no longer
   exist without one. The first line
   of the textfiles contains now the title
   and will be inserted by mkref into the xml file.

todo: switch from xmlto to dblatex for the pdf generation
and re-enable it in the makefile.

12 years agoGenerate ChangeLog from git log during 'make dist'
Ian Abbott [Fri, 20 Apr 2012 13:18:53 +0000 (14:18 +0100)]
Generate ChangeLog from git log during 'make dist'

Generate the ChangeLog using git log in the dist-hook target of the main
Makefile.  The git command used is:

git log --stat --name-only --date=iso

The format of the resulting ChangeLog is different to the old one that
was produced with cvs2cl.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agodoc/reference.xml: Added section for comedi_polynomial_t.
Ian Abbott [Fri, 20 Apr 2012 12:28:15 +0000 (13:28 +0100)]
doc/reference.xml: Added section for comedi_polynomial_t.

The tutorial.xml contained links to a missing section for the
comedi_polynomial_t type, so I added one.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agodoc/Makefile: Remove *.css files on uninstallation.
Ian Abbott [Fri, 20 Apr 2012 11:26:34 +0000 (12:26 +0100)]
doc/Makefile: Remove *.css files on uninstallation.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agoMakefile.am: Remove 'debian' from EXTRA_DIST.
Ian Abbott [Fri, 20 Apr 2012 11:10:01 +0000 (12:10 +0100)]
Makefile.am: Remove 'debian' from EXTRA_DIST.

The 'debian' target doesn't exist and there is no rule to make it, so
remove it from EXTRA_DIST.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agoMakefile.am: Don't bother removing CVS directories in dist-hook.
Ian Abbott [Fri, 20 Apr 2012 10:57:23 +0000 (11:57 +0100)]
Makefile.am: Don't bother removing CVS directories in dist-hook.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agotodo: Added note about Ruby bindings disabled by default.
Ian Abbott [Fri, 20 Apr 2012 09:42:25 +0000 (10:42 +0100)]
todo: Added note about Ruby bindings disabled by default.

Signed-off-by: Ian Abbott <abbotti.mev.co.uk>
12 years agoconfigure.ac: Use AS_HELP_STRING()
Ian Abbott [Fri, 20 Apr 2012 09:34:27 +0000 (10:34 +0100)]
configure.ac: Use AS_HELP_STRING()

Use AS_HELP_STRING() to make the HELP-STRING arguments for the
AC_ARG_ENABLE() and AC_ARG_WITH() macro calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agoconfigure: Disable Ruby bindings by default.
Ian Abbott [Fri, 20 Apr 2012 09:11:57 +0000 (10:11 +0100)]
configure: Disable Ruby bindings by default.

The SWIG Ruby bindings do not build cleanly from scratch.  They need an
existing installation of comedilib.  So disable them in the default
configuration.  They can be enabled with the --enable-ruby-bindings
configure option.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agoinclude/comedi.h: synced with comedi
Ian Abbott [Mon, 16 Apr 2012 13:53:28 +0000 (14:53 +0100)]
include/comedi.h: synced with comedi

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
12 years agodriverwriting.xml: COMEDI_CB_EOA is also used to report end-of-output.
W. Trevor King [Mon, 16 Apr 2012 12:58:20 +0000 (08:58 -0400)]
driverwriting.xml: COMEDI_CB_EOA is also used to report end-of-output.

12 years agodriverwriting.xml: COMEDI_CB_OVERFLOW is also used to report underflows.
W. Trevor King [Mon, 16 Apr 2012 11:52:48 +0000 (07:52 -0400)]
driverwriting.xml: COMEDI_CB_OVERFLOW is also used to report underflows.

12 years agoAdd myself to the comedi.i copyright, since I just tweaked it.
W. Trevor King [Tue, 13 Mar 2012 13:37:08 +0000 (09:37 -0400)]
Add myself to the comedi.i copyright, since I just tweaked it.

I also added 2010 for:

  commit 3fe8e6baac051d80906c6fac6c18c04c8df9ce4a
  Author: Ian Abbott <abbotti@mev.co.uk>
  Date:   Mon Dec 20 14:50:21 2010 +0000

    Add sampl_t and lsampl_t array_class()es to comedi.i.
    ...
    Patch from W. Trevor King.

12 years agoSuggest people use `PYTHONPATH` rather than adjusting `sys.path` internally.
W. Trevor King [Tue, 13 Mar 2012 13:30:45 +0000 (09:30 -0400)]
Suggest people use `PYTHONPATH` rather than adjusting `sys.path` internally.

The old method only worked out of the box if you were running Python
2.1 on a 586.  I imagine that is too small a slice of current users to
be worth hard coding ;).

12 years agoAdd myself to the old Python demo copyrights, since I just tweaked each demo.
W. Trevor King [Tue, 13 Mar 2012 13:24:07 +0000 (09:24 -0400)]
Add myself to the old Python demo copyrights, since I just tweaked each demo.

12 years agoOops, fix copyright month on `demo/python/insn.py`.
W. Trevor King [Tue, 13 Mar 2012 13:22:03 +0000 (09:22 -0400)]
Oops, fix copyright month on `demo/python/insn.py`.

12 years agoCast the period to an integer in `demo/python/mmap.py`'s command setup.
W. Trevor King [Tue, 13 Mar 2012 13:17:08 +0000 (09:17 -0400)]
Cast the period to an integer in `demo/python/mmap.py`'s command setup.

This avoids:

   Traceback (most recent call last):
     ...
     File ".../mmap.py", line 96, in prepare_cmd
       C.scan_begin_arg = 1e9/freq
     ...
   TypeError: in method 'comedi_cmd_struct_scan_begin_arg_set',
      argument 2 of type 'unsigned int'

12 years agoAdjust `sys.path` before importing `mmap` in `demo/python/mmap.py`.
W. Trevor King [Tue, 13 Mar 2012 13:12:41 +0000 (09:12 -0400)]
Adjust `sys.path` before importing `mmap` in `demo/python/mmap.py`.

With the previous implementation, `mmap` was importing the demo
script, not the standard `mmap` library module.  From the docs [1]:

  The directory containing the script being run is placed at the
  beginning of the search path, ahead of the standard library
  path. This means that scripts in that directory will be loaded
  instead of modules of the same name in the library directory.

I'm not sure when this changed in Python, since the demo script
presumably worked with an earlier version.

[1]: http://docs.python.org/tutorial/modules.html#the-module-search-path

12 years agoCast the period to an integer in `demo/python/cmd.py`'s command setup.
W. Trevor King [Tue, 13 Mar 2012 12:58:19 +0000 (08:58 -0400)]
Cast the period to an integer in `demo/python/cmd.py`'s command setup.

This avoids:

  TypeError: in method 'comedi_get_cmd_generic_timed',
    argument 5 of type 'unsigned int'

12 years agoAdd serial and PWM subdevice types to `demo/python/info.py`.
W. Trevor King [Tue, 13 Mar 2012 12:47:48 +0000 (08:47 -0400)]
Add serial and PWM subdevice types to `demo/python/info.py`.

This catches it up for the folowing commits to the comedi repository:

  commit 311e9c540217d60bdf56a1dba9eafe474fd3b218
  Author: Bernd Porr <Bernd.Porr@f2s.com>
  Date:   Sun Jan 13 23:07:02 2008 +0000

    Added a proper PWM subdevice for comedi.

  commit 8092ed57ff38e1fcaf75a7e0bf3b8c4f5372f3d7
  Author: Frank Mori Hess <fmhess@speakeasy.net>
  Date:   Sat Jan 31 22:13:09 2004 +0000

    serial dio (SCXI) support from Caleb Tennis

12 years agoAdd `chanlist_len` to `comedi_get_cmd_generic_timed()` calls in Python demos.
W. Trevor King [Tue, 13 Mar 2012 12:41:24 +0000 (08:41 -0400)]
Add `chanlist_len` to `comedi_get_cmd_generic_timed()` calls in Python demos.

This catches the Python demos up to:

  commit 003b9ec501b5c69f25bfbc68e8b3f923d482bb04
  Author: Ian Abbott <abbotti@mev.co.uk>
  Date:   Mon Nov 8 11:01:42 2010 +0000

    Add chanlist_len parameter to comedi_get_cmd_generic_timed.

12 years agoAdd `demo/python/insn.py`, a Python clone of `demo/insn.c`.
W. Trevor King [Tue, 13 Mar 2012 12:36:39 +0000 (08:36 -0400)]
Add `demo/python/insn.py`, a Python clone of `demo/insn.c`.

12 years agoAdd an `insn_array` array_class to `comedi.i`.
W. Trevor King [Tue, 13 Mar 2012 12:31:36 +0000 (08:31 -0400)]
Add an `insn_array` array_class to `comedi.i`.

This makes it possible to populate `comedi_insnslist_struct` for use
with `comedi_do_insnlist`.

I also removed my earlier re-typedefs of `sampl_array` and
`lsampl_array`.  I didn't understand the reason for the underlying
`TypeError` when I added them.  The proper way to avoid that error is
to use the `.cast()` and `.frompointer()` methods.  See
`demo/python/insn.py` (coming soon) for details.

12 years agoRemoved comedi_calibrate.8 man page.
Ian Abbott [Mon, 13 Feb 2012 11:36:13 +0000 (11:36 +0000)]
Removed comedi_calibrate.8 man page.

The comedi_calibrate.8 man page has been moved to the comedi_calibrate
package where it belongs.  Thanks to W. Trevor King for pointing it out.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agolibcomedi: don't ignore channel in comedi_set_clock_source()
Ian Abbott [Thu, 1 Dec 2011 15:37:43 +0000 (15:37 +0000)]
libcomedi: don't ignore channel in comedi_set_clock_source()

Fix bug reported by Finn Hoffman on comedi email list.

13 years agom4/am-check-python-headers.m4: Python 3 wrapper for comedi
Christoph Schmidt-Hieber [Wed, 17 Aug 2011 09:26:51 +0000 (10:26 +0100)]
m4/am-check-python-headers.m4: Python 3 wrapper for comedi

Here's a small patch to make the configure script compatible with Python
3. The wrapper itself (swig/python/comedi_python_wrap.c) will have to be
generated with SWIG >= 2.0.0 for Python 3 compatibility.

13 years agocomedi_test: Remove unnecessary assignment of 'go' when checking data
Ian Abbott [Mon, 27 Jun 2011 12:08:08 +0000 (13:08 +0100)]
comedi_test: Remove unnecessary assignment of 'go' when checking data

The 'go' variable is only used by the 'while' loop that reads the data.
We don't need to set it in the 'for' loop that checks the data
afterwards.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agocomedi_test: Fix buffer overrun in test_mmap()
Ian Abbott [Mon, 27 Jun 2011 12:03:03 +0000 (13:03 +0100)]
comedi_test: Fix buffer overrun in test_mmap()

If the command does not stop immediately after the last sample, there
can be more data to read than we have room for.  Make sure the 'while'
loop 'read()' does not overrun the end of the malloc'ed 'buf'.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agoFix a couple of typos.
Ian Abbott [Wed, 11 May 2011 11:05:55 +0000 (12:05 +0100)]
Fix a couple of typos.

A couple of the include files are missing the 'p' in 'published' in the
file header comment.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agoCOMEDILIB_CFLAGS: Fix for separate build directory.
Ian Abbott [Wed, 11 May 2011 10:45:07 +0000 (11:45 +0100)]
COMEDILIB_CFLAGS: Fix for separate build directory.

When doing an out-of-tree build, the comedi_version.h file is in
the build tree, not in the source tree.  The CFLAGS needs an additional
-I option so the compiler can find it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agoINSTALL: Changed cvs reference to git.
Ian Abbott [Tue, 10 May 2011 13:42:46 +0000 (14:42 +0100)]
INSTALL: Changed cvs reference to git.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agoREADME: Update mailing list details.
Ian Abbott [Tue, 10 May 2011 13:41:02 +0000 (14:41 +0100)]
README: Update mailing list details.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agoREADME: Changed CVS references to Git.
Ian Abbott [Tue, 10 May 2011 13:36:06 +0000 (14:36 +0100)]
README: Changed CVS references to Git.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agoREADME.CVS: Renamed to README.Git and edited slightly.
Ian Abbott [Tue, 10 May 2011 13:22:16 +0000 (14:22 +0100)]
README.CVS: Renamed to README.Git and edited slightly.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
13 years agoAdd comedilib_version.h header, produced by ./configure,
Ian Abbott [Wed, 26 Jan 2011 16:29:34 +0000 (16:29 +0000)]
Add comedilib_version.h header, produced by ./configure,
included by comedilib.h, containing COMEDILIB_VERSION_MAJOR,
COMEDILIB_VERSION_MINOR, COMEDILIB_VERSION_MICRO, and
COMEDILIB_CHECK_VERSION(major,minor,micro).  This can be used to perform
C pre-processor checks for API changes in comedilib.

13 years ago#include <sys/stat.h> needed for fstat().
Ian Abbott [Wed, 5 Jan 2011 15:02:44 +0000 (15:02 +0000)]
#include <sys/stat.h> needed for fstat().

14 years agoUpdated procedures for building with Python's distutils. Also reduced
Ian Abbott [Mon, 20 Dec 2010 15:49:59 +0000 (15:49 +0000)]
Updated procedures for building with Python's distutils.  Also reduced
line-lengths for 80-character wide terminals.  Most of the updated text
supplied by W. Trevor King.  Ian Abbott added a note that it only applies
when building the wrappers separately from Comedilib without 'make'.