Commit graph

64 commits

Author SHA1 Message Date
Ian Abbott
0378db7399 comedi.h: adjust header comment
Don't mention where the header gets installed.
2016-03-21 11:27:40 +00:00
Ian Abbott
8b01d77b80 comedi.h: Add note that the "aux data" config options are still used
The COMEDI_DEVCONF_AUX_DATA3_LENGTH, COMEDI_DEVCONF_AUX_DATA2_LENGTH,
COMEDI_DEVCONF_AUX_DATA1_LENGTH, COMEDI_DEVCONF_AUX_DATA0_LENGTH,
COMEDI_DEVCONF_AUX_DATA_HI, COMEDI_DEVCONF_AUX_DATA_LO, and
COMEDI_DEVCONF_AUX_DATA_LENGTH config option indices are still used by
the standalone COMEDI kernel modules built from comedi.org sources for
loading firmware in some driver modules, although they are no longer
used by the COMEDI kernel modules in the Linux kernel sources.  Adjust
the comment to reflect this.
2016-03-21 11:08:06 +00:00
Ian Abbott
ef4c4e2e08 Avoid using BIT(x) macro
The BIT(x) macro is used by some internal kernel headers and is not
used in user API kernel headers.  It was used incorrectly in the
"staging" kernel version of "comedi.h" in the "linux-next" tree for a
brief period.

Replace the use of BIT(x) with explicit masks.  Handle CR_INVERT
specially in SWIG to avoid it appearing as a negative integer.
_CR_FLAGS_MASK was defined twice, identically, in SWIG, so remove one of
the definitions.
2016-03-21 10:35:16 +00:00
Spencer E. Olson
b9821b9d8c Sync removal of obsolete/useless items in comedi.h
This patch removes COMEDI_CB_* macros that are of no use to userspace at
any rate.  COMEDI_CB_* are no longer in comedi.h in the staging tree, but
rather in comedidev.h.

This patch also removes an old commented-out INSN_CONFIG_GET_OTHER_SRC, the
value of which was already taken long ago by
INSN_CONFIG_GET_HARDWARE_BUFFER_SIZE.
2016-03-18 12:26:52 -06:00
Spencer E. Olson
5d36757aa6 Move old items of comedi.h into new "deprecated" section
This allows the body of comedi to maintain visual sync to that of the
staging tree.
2016-03-18 12:19:22 -06:00
Spencer E. Olson
5cb320d559 Use BIT(x) macro for better sync to staging comedi.h
This patch defines a copy of the kernel BIT(x) macro and syncs the use of
BIT(x) between the staging tree and comedilib versions of comedi.h
2016-03-18 12:09:04 -06:00
Spencer E. Olson
0bb9805c82 Inherit documentation from staging comedi.h
This partial sync of staging tree to the comedilib version of comedi.h
brings documentation and some mild formatting.  The documentation should be
beneficial to userspace and the sync helps to visually maintain future
syncing between kernel and userspace code.
2016-03-18 12:05:17 -06:00
Spencer E. Olson
823bf1e398 Teach SWIG to properly handle some unsigned consts for python
This revisits the change made in da0fe745fc:
1)  Changes c-macro constants back to their original definition (without
    explicit typing them as unsigned) so-as to more exactly compare
    the comedilib version of comedi.h with that of the kernel module.
2)  Removes the duplicate definition of NI_GPCT_INVERT_CLOCK_SRC_BIT in
    comedi.i.
3)  Instead of redefining the macros to fix the mishandling of signedness
    by SWIG for python, teach SWIG to treat these as unsigned ints.
2016-03-18 10:17:11 -06:00
Spencer E. Olson
9d4b7367eb change static inline NI_* to macros
This is a partial sync of the staging tree to comedilib with these
benefits:
1.  This is first in a series of patches to sync comedilib to the kernel
    modules in the staging development tree.  The point of this series of
    patches is to make the syncing of the userspace and kernel comedi.h
    files be visually more easily done.

2.  This patch also teaches SWIG out to properly wrap these macros and
    provide them to the user.

3.  The redef of static inline NI_* functions as macro functions eases
    alternative use of comedi.h as an import source for a new ctypes-based
    python interface for comedilib.
2016-03-18 10:12:37 -06:00
Ian Abbott
ba27bddca4 include/comedi.h: synced with comedi
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2016-03-18 12:07:08 +00:00
Éric Piel
da0fe745fc include: explicitly indicate values are unsigned when it could matter
In C, mixing up between int and unsigned int doesn't matter too much for constants
because in memory they end up the same.
However, in Python, they appear differently.

Swig assumes (wrongly?) by default that the constants are signed, intead of being unsigned.
For every value equal or greater that 2**31, it matters.
For instance CR_INVERT should be 2147483648, but it is -2147483648 in python.
By marking the values explicitly unsigned, swig generates the right values.

That's excepted for enum, which swig just consider int. So for the only constant in that
case, we manually override it in swig.
2015-06-08 11:21:11 +01:00
Ian Abbott
18fc613988 include/comedi.h: synced with comedi
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2013-05-14 17:35:49 +01:00
Ian Abbott
ddec51884b include/comedi.h: synced with comedi
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2013-03-21 16:27:56 +00:00
Ian Abbott
ee2986755a include/comedi.h: synced with comedi
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2012-04-16 14:53:28 +01:00
Frank Mori Hess
ac9f5f248f synced with comedi. 2008-09-16 14:01:38 +00:00
Frank Mori Hess
2edd66775b synced with comedi. 2008-03-28 15:29:16 +00:00
Bernd Porr
9493cf1b47 Synced this with comedi. PWM support. 2008-01-13 23:18:05 +00:00
Ian Abbott
df5e7fde3f Synced with comedi. 2007-11-30 12:24:08 +00:00
Frank Mori Hess
c73ce599a6 synced with comedi. 2007-10-29 00:58:41 +00:00
Frank Mori Hess
334b16aabe Synced with comedi. 2007-10-17 20:17:43 +00:00
Frank Mori Hess
e8ad2b3498 Sync with comedi. 2007-09-28 19:02:02 +00:00
Frank Mori Hess
da5769b50f synced with comedi. 2007-08-13 21:18:47 +00:00
Frank Mori Hess
c8ff80779b Synced with comedi. 2007-07-16 15:01:06 +00:00
Frank Mori Hess
23acd1d5bd Sync with comedi. 2007-07-13 20:32:43 +00:00
Frank Mori Hess
c5bd91e4c8 sync with comedi 2007-07-12 14:56:21 +00:00
Frank Mori Hess
9804a8c81d Demo program for quadrature encoder counting with NI GPCT, from
Anders Blomdell <anders.blomdell@control.lth.se>
2007-06-28 01:22:38 +00:00
Frank Mori Hess
88d88b1f41 synced with comedi. 2007-02-26 17:24:24 +00:00
Frank Mori Hess
a5cbc369a1 synced with comedi. 2007-01-08 21:54:15 +00:00
Frank Mori Hess
98b683b85d synced with comedi 2007-01-05 20:39:17 +00:00
Frank Mori Hess
261de96d3a Sync'd with comedi 2006-10-24 20:36:33 +00:00
Frank Mori Hess
a31d71f349 Sync'ed with comedi. 2006-10-24 15:07:08 +00:00
Frank Mori Hess
4cdf1b09a9 Added choose_clock and choose_routing demo programs. Synced comedi.h
with comedi.  Made dio demo simply configure the line direction based
on the command line argument.
2006-10-23 19:35:24 +00:00
Frank Mori Hess
fe9d8704c2 sync with comedi 2006-09-08 15:41:05 +00:00
Frank Mori Hess
c548e18087 sync with comedi 2006-03-03 01:00:50 +00:00
Frank Mori Hess
adac86b5d9 synced with comedi 2006-01-08 16:37:59 +00:00
Frank Mori Hess
8ff9586edb sync comedi.h with comedi 2005-11-02 00:18:27 +00:00
Frank Mori Hess
111541c2d3 sync with comedi 2005-03-17 17:27:12 +00:00
Frank Mori Hess
1e601cbd3f sync with comedi 2005-03-06 17:35:04 +00:00
Frank Mori Hess
cd07b7217b fix license headers, and prevent multiple includes of comedilib_scxi.h 2005-02-06 16:22:41 +00:00
Frank Mori Hess
5d4729b9ec mmap works for output waveforms now. 2005-01-23 03:11:30 +00:00
Frank Mori Hess
f97908c06e sync with comedi 2004-02-18 00:14:30 +00:00
Frank Mori Hess
659520b958 sync with comedi 2004-01-31 22:19:47 +00:00
Frank Mori Hess
0812812571 sync with comedi 2003-07-16 16:26:14 +00:00
David Schleef
6bc9f5f03d update from comedi 2002-11-22 07:17:15 +00:00
David Schleef
0fbbbef2dd copy from Comedi 2002-07-04 03:30:39 +00:00
Frank Mori Hess
118dfa65c3 sync with comedi 2002-07-01 04:01:53 +00:00
David Schleef
4d143d616d Make CR_PACK less strict. 2002-05-17 02:22:35 +00:00
Frank Mori Hess
3dd23bc127 sync with comedi 2002-05-07 23:42:30 +00:00
Frank Mori Hess
21d7877c2d Horrible hack to allow passing of CR flags through channel arguments. Made
comedi_calibrate use comedi_data_read_n() from main library.  Should be able
to add computer boards support to comedi_calibrate soon now.
2002-04-30 22:56:30 +00:00
Frank Mori Hess
611740983c updated from comedi, for calibration config stuff 2002-04-17 03:58:23 +00:00