1COMEDI_GET_SUBDEVICE_FLAGS(3)                    COMEDI_GET_SUBDEVICE_FLAGS(3)
2
3
4

NAME

6       comedi_get_subdevice_flags - properties of subdevice
7

SYNOPSIS

9       #include <comedilib.h>
10
11       int  comedi_get_subdevice_flags (comedi_t * device, unsigned int subde‐
12       vice);
13

DESCRIPTION

15       This function returns a bitfield describing  the  capabilities  of  the
16       specified  subdevice.   If  there  is an error, -1 is returned, and the
17       Comedilib error value is set.
18
19       "SUBDEVICE    FLAGS"    Subdevice    FlagValue    (hexadecimal)Descrip‐
20       tionSDF_BUSY0x00000001The  subdevice is busy performing an asynchronous
21       command.  A subdevice being "busy" is slightly different from the "run‐
22       ning"  state  flagged  by SDF_RUNNING.  A "running" subdevice is always
23       "busy", but a "busy" subdevice is not necessarily "running".  For exam‐
24       ple,  suppose  an  analog input command has been completed by the hard‐
25       ware, but there are still samples in Comedi's buffer waiting to be read
26       out.  In this case, the subdevice is not "running", but is still "busy"
27       until  all  the  samples   are   read   out   or   comedi_cancel()   is
28       called.SDF_BUSY_OWNER0x00000002The subdevice is "busy", and the command
29       it     is     running     was     started      by      the      current
30       process.SDF_LOCKED0x00000004The    subdevice   has   been   locked   by
31       comedi_lock().SDF_LOCK_OWNER0x00000008The subdevice is locked, and  was
32       locked  by  the  current  process.SDF_MAXDATA0x00000010The maximum data
33       value for the subdevice depends on  the  channel.SDF_FLAGS0x00000020The
34       subdevice  flags  depend  on  the channel (unfinished/broken support in
35       library).SDF_RANGETYPE0x00000040The range type  depends  on  the  chan‐
36       nel.SDF_CMD0x00001000The    subdevice    supports   asynchronous   com‐
37       mands.SDF_SOFT_CALIBRATED0x00002000The subdevice relies on the host  to
38       do  calibration  in  software.   Software  calibration coefficients are
39       determined by the comedi_soft_calibrate utility.  See  the  description
40       of   the  comedi_get_softcal_converter()  function  for  more  informa‐
41       tion.SDF_READABLE0x00010000The  subdevice  can  be  read  (e.g.  analog
42       input).SDF_WRITABLE0x00020000The subdevice can be written to (e.g. ana‐
43       log output).SDF_INTERNAL0x00040000The subdevice does  not  have  exter‐
44       nally    visible   lines.SDF_GROUND0x00100000The   subdevice   supports
45       AREF_GROUND.SDF_COMMON0x00200000The   subdevice   supports    AREF_COM‐
46       MON.SDF_DIFF0x00400000The               subdevice              supports
47       AREF_DIFF.SDF_OTHER0x00800000The    subdevice    supports     AREF_OTH‐
48       ERSDF_DITHER0x01000000The   subdevice   supports   dithering  (via  the
49       CR_ALT_FILTER chanspec flag).SDF_DEGLITCH0x02000000The  subdevice  sup‐
50       ports   deglitching  (via  the  CR_ALT_FILTER  chanspec  flag).SDF_RUN‐
51       NING0x08000000An asynchronous command is running.   You  can  use  this
52       flag    to    poll    for    the   completion   of   an   output   com‐
53       mand.SDF_LSAMPL0x10000000The subdevice uses the 32  bit  lsampl_t  type
54       instead    of   the   16   bit   sampl_t   for   asynchronous   command
55       data.SDF_PACKED0x20000000The subdevice uses bitfield samples for  asyn‐
56       chronous  command  data,  one  bit  per  channel (otherwise it uses one
57       sampl_t or lsampl_t per channel).  Commonly  used  for  digital  subde‐
58       vices.
59
60                                28 October 2007  COMEDI_GET_SUBDEVICE_FLAGS(3)
Impressum