comedi_get_subdevice_flags man page
comedi_get_subdevice_flags — properties of subdevice
int comedi_get_subdevice_flags (comedi_t * device, unsigned int subdevice);
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.
"SUBDEVICE FLAGS" Subdevice FlagValue (hexadecimal)DescriptionSDF_BUSY0x00000001The 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.SDF_BUSY_OWNER0x00000002The subdevice is "busy", and the command it is running was started by the current process.SDF_LOCKED0x00000004The subdevice has been locked by comedi_lock().SDF_LOCK_OWNER0x00000008The subdevice is locked, and was locked by the current process.SDF_MAXDATA0x00000010The maximum data value for the subdevice depends on the channel.SDF_FLAGS0x00000020The subdevice flags depend on the channel (unfinished/broken support in library).SDF_RANGETYPE0x00000040The range type depends on the channel.SDF_CMD0x00001000The subdevice supports asynchronous commands.SDF_SOFT_CALIBRATED0x00002000The subdevice relies on the host to do calibration in software. Software calibration coefficients are determined by the comedi_soft_calibrate utility. See the description of the comedi_get_softcal_converter() function for more information.SDF_READABLE0x00010000The subdevice can be read (e.g. analog input).SDF_WRITABLE0x00020000The subdevice can be written to (e.g. analog output).SDF_INTERNAL0x00040000The subdevice does not have externally visible lines.SDF_GROUND0x00100000The subdevice supports AREF_GROUND.SDF_COMMON0x00200000The subdevice supports AREF_COMMON.SDF_DIFF0x00400000The subdevice supports AREF_DIFF.SDF_OTHER0x00800000The subdevice supports AREF_OTHERSDF_DITHER0x01000000The subdevice supports dithering (via the CR_ALT_FILTER chanspec flag).SDF_DEGLITCH0x02000000The subdevice supports deglitching (via the CR_ALT_FILTER chanspec flag).SDF_RUNNING0x08000000An asynchronous command is running. You can use this flag to poll for the completion of an output command.SDF_LSAMPL0x10000000The subdevice uses the 32 bit lsampl_t type instead of the 16 bit sampl_t for asynchronous command data.SDF_PACKED0x20000000The 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.