added table for subdevice flags to comedi_get_subdevice_flags()
authorFrank Mori Hess <fmhess@speakeasy.net>
Wed, 16 Mar 2005 22:34:38 +0000 (22:34 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Wed, 16 Mar 2005 22:34:38 +0000 (22:34 +0000)
documentation

doc/funcref

index fb68ca00675b3277455c29139d0ca2ee36b08946..da6865690d23a9e64ec0bf0cd5b1c2d668c3b9fa 100644 (file)
@@ -228,8 +228,130 @@ Description:
  This function returns a bitfield describing the capabilities of
  the specified subdevice.  If there is an error, -1 is returned,
  and the Comedilib error value is set.
-
- XXX table.
+ <table COLSEP="1" ROWSEP="1" ORIENT="port" PGWIDE="1">
+ <title>subdevice flags</title>
+ <tgroup COLS="3" ALIGN="left" >
+ <thead>
+ <row>
+ <entry>Subdevice Flag</entry>
+ <entry>Value (hexadecimal)</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>SDF_BUSY</entry>
+ <entry>0x1</entry>
+ <entry>The subdevice is busy performing an asynchronous command.  A subdevice being "busy"
+ is slightly different from the "running" state flagged by SDF_RUNNING.  A "running" subdevice
+ is always "busy", but a "busy" subdevice is not necessarily "running".  For example, suppose an
+ analog input command has been completed by the hardware, but there are still samples in
+ Comedi's buffer waiting to be read out.  In this case, the subdevice is not "running", but
+ is still "busy" until all the samples are read out or comedi_cancel() is called.</entry>
+ </row>
+ <row>
+ <entry>SDF_BUSY_OWNER</entry>
+ <entry>0x2</entry>
+ <entry>The subdevice is "busy", and the command it is running was started by the current process.</entry>
+ </row>
+ <row>
+ <entry>SDF_LOCKED</entry>
+ <entry>0x4</entry>
+ <entry>The subdevice has been locked by comedi_lock().</entry>
+ </row>
+ <row>
+ <entry>SDF_LOCK_OWNER</entry>
+ <entry>0x8</entry>
+ <entry>The subdevice is locked, and was locked by the current process.</entry>
+ </row>
+ <row>
+ <entry>SDF_MAXDATA</entry>
+ <entry>0x10</entry>
+ <entry>The maximum data value for the subdevice depends on the channel.</entry>
+ </row>
+ <row>
+ <entry>SDF_FLAGS</entry>
+ <entry>0x20</entry>
+ <entry>The subdevice flags depend on the channel (unfinished/broken support in library).</entry>
+ </row>
+ <row>
+ <entry>SDF_RANGETYPE</entry>
+ <entry>0x40</entry>
+ <entry>The range type depends on the channel.</entry>
+ </row>
+ <row>
+ <entry>SDF_CMD</entry>
+ <entry>0x1000</entry>
+ <entry>The subdevice supports asynchronous commands.</entry>
+ </row>
+ <row>
+ <entry>SDF_READABLE</entry>
+ <entry>0x10000</entry>
+ <entry>The subdevice can be read (e.g. analog input).</entry>
+ </row>
+ <row>
+ <entry>SDF_WRITABLE</entry>
+ <entry>0x20000</entry>
+ <entry>The subdevice can be written to (e.g. analog output).</entry>
+ </row>
+ <row>
+ <entry>SDF_INTERNAL</entry>
+ <entry>0x40000</entry>
+ <entry>The subdevice does not have externally visible lines.</entry>
+ </row>
+ <row>
+ <entry>SDF_GROUND</entry>
+ <entry>0x100000</entry>
+ <entry>The subdevice supports AREF_GROUND.</entry>
+ </row>
+ <row>
+ <entry>SDF_COMMON</entry>
+ <entry>0x200000</entry>
+ <entry>The subdevice supports AREF_COMMON.</entry>
+ </row>
+ <row>
+ <entry>SDF_DIFF</entry>
+ <entry>0x400000</entry>
+ <entry>The subdevice supports AREF_DIFF.</entry>
+ </row>
+ <row>
+ <entry>SDF_OTHER</entry>
+ <entry>0x800000</entry>
+ <entry>The subdevice supports AREF_OTHER</entry>
+ </row>
+ <row>
+ <entry>SDF_DITHER</entry>
+ <entry>0x1000000</entry>
+ <entry>The subdevice supports dithering (via the CR_ALT_FILTER chanspec flag).</entry>
+ </row>
+ <row>
+ <entry>SDF_DEGLITCH</entry>
+ <entry>0x2000000</entry>
+ <entry>The subdevice supports deglitching (via the CR_ALT_FILTER chanspec flag).</entry>
+ </row>
+ <row>
+ <entry>SDF_RUNNING</entry>
+ <entry>0x8000000</entry>
+ <entry>An asynchronous command is running.  You can use this flag to poll for the completion of an
+ output command.</entry>
+ </row>
+ <row>
+ <entry>SDF_LSAMPL</entry>
+ <entry>0x10000000</entry>
+ <entry>The subdevice uses the 32 bit lsampl_t type instead of the 16 bit sampl_t for
+ asynchronous command data.</entry>
+ </row>
+ <row>
+ <entry>SDF_PACKED</entry>
+ <entry>0x20000000</entry>
+ <entry>The subdevice uses bitfield samples for asynchronous command data, 
+ one bit per channel (otherwise it uses
+ one sampl_t or lsampl_t per channel).  Commonly used for digital subdevices.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
 
 Function: comedi_get_n_channels -- number of subdevice channels
 Retval: int