'\" t .\" Title: comedi_get_subdevice_flags .\" Author: David Schleef .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 02/28/2024 .\" Manual: Comedi reference .\" Source: Comedi .\" Language: English .\" .TH "COMEDI_GET_SUBDEVICE" "3" "02/28/2024" "Comedi" "Comedi reference" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" comedi_get_subdevice_flags \- properties of subdevice .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ comedi_get_subdevice_flags('u .BI "int comedi_get_subdevice_flags(comedi_t\ *\ " "device" ", unsigned\ int\ " "subdevice" ");" .SH "DESCRIPTION" .PP The function \fBcomedi_get_subdevice_flags\fR returns a bitfield describing the capabilities of the specified subdevice \fIsubdevice\fR of the Comedi device \fIdevice\fR\&. If there is an error, \-1 is returned, and the Comedilib error value is set\&. .PP .TS allbox expand tab(:); lB lB lB. T{ Subdevice Flag T}:T{ Value (hex) T}:T{ Description T} .T& l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ \fBSDF_BUSY\fR T}:T{ 0x00000001 T}:T{ The subdevice is busy performing an asynchronous command\&. A subdevice being \(lqbusy\(rq is slightly different from the \(lqrunning\(rq state flagged by \fBSDF_RUNNING\fR\&. A \(lqrunning\(rq subdevice is always \(lqbusy\(rq, but a \(lqbusy\(rq subdevice is not necessarily \(lqrunning\(rq\&. For example, suppose an analog input command has been completed by the hardware, but there are still samples in Comedi\*(Aqs buffer waiting to be read out\&. In this case, the subdevice is not \(lqrunning\(rq, but is still \(lqbusy\(rq until all the samples are read out or \fBcomedi_cancel\fR is called\&. T} T{ \fBSDF_BUSY_OWNER\fR T}:T{ 0x00000002 T}:T{ The subdevice is \(lqbusy\(rq, and the command it is running was started by the current process\&. T} T{ \fBSDF_LOCKED\fR T}:T{ 0x00000004 T}:T{ The subdevice has been locked by \fBcomedi_lock\fR\&. T} T{ \fBSDF_LOCK_OWNER\fR T}:T{ 0x00000008 T}:T{ The subdevice is locked, and was locked by the current process\&. T} T{ \fBSDF_MAXDATA\fR T}:T{ 0x00000010 T}:T{ The maximum data value for the subdevice depends on the channel\&. T} T{ \fBSDF_FLAGS\fR T}:T{ 0x00000020 T}:T{ The subdevice flags depend on the channel (unfinished/broken support in library)\&. T} T{ \fBSDF_RANGETYPE\fR T}:T{ 0x00000040 T}:T{ The range type depends on the channel\&. T} T{ \fBSDF_CMD\fR T}:T{ 0x00001000 T}:T{ The subdevice supports asynchronous commands\&. T} T{ \fBSDF_SOFT_CALIBRATED\fR T}:T{ 0x00002000 T}:T{ The subdevice relies on the host to do calibration in software\&. Software calibration coefficients are determined by the \fBcomedi_soft_calibrate\fR utility\&. See the description of the \fBcomedi_get_softcal_converter\fR function for more information\&. T} T{ \fBSDF_READABLE\fR T}:T{ 0x00010000 T}:T{ The subdevice can be read (e\&.g\&. analog input)\&. T} T{ \fBSDF_WRITABLE\fR T}:T{ 0x00020000 T}:T{ The subdevice can be written to (e\&.g\&. analog output)\&. T} T{ \fBSDF_INTERNAL\fR T}:T{ 0x00040000 T}:T{ The subdevice does not have externally visible lines\&. T} T{ \fBSDF_GROUND\fR T}:T{ 0x00100000 T}:T{ The subdevice supports analog reference \fBAREF_GROUND\fR\&. T} T{ \fBSDF_COMMON\fR T}:T{ 0x00200000 T}:T{ The subdevice supports analog reference \fBAREF_COMMON\fR\&. T} T{ \fBSDF_DIFF\fR T}:T{ 0x00400000 T}:T{ The subdevice supports analog reference \fBAREF_DIFF\fR\&. T} T{ \fBSDF_OTHER\fR T}:T{ 0x00800000 T}:T{ The subdevice supports analog reference \fBAREF_OTHER\fR T} T{ \fBSDF_DITHER\fR T}:T{ 0x01000000 T}:T{ The subdevice supports dithering (via the \fBCR_ALT_FILTER\fR chanspec flag)\&. T} T{ \fBSDF_DEGLITCH\fR T}:T{ 0x02000000 T}:T{ The subdevice supports deglitching (via the \fBCR_ALT_FILTER\fR chanspec flag)\&. T} T{ \fBSDF_RUNNING\fR T}:T{ 0x08000000 T}:T{ An asynchronous command is running\&. You can use this flag to poll for the completion of an output command\&. T} T{ \fBSDF_LSAMPL\fR T}:T{ 0x10000000 T}:T{ The subdevice uses the 32\-bit \fBlsampl_t\fR type instead of the 16\-bit \fBsampl_t\fR for asynchronous command data\&. T} T{ \fBSDF_PACKED\fR T}:T{ 0x20000000 T}:T{ The subdevice uses bitfield samples for asynchronous command data, one bit per channel (otherwise it uses one \fBsampl_t\fR or \fBlsampl_t\fR per channel)\&. Commonly used for digital subdevices\&. T} .TE .sp 1 .PP .SH "AUTHORS" .PP \fBDavid Schleef\fR <\&ds@schleef.org\&> .RS 4 Author. .RE .PP \fBFrank Mori Hess\fR <\&fmhess@users.sourceforge.net\&> .RS 4 Author. .RE .PP \fBHerman Bruyninckx\fR <\&Herman.Bruyninckx@mech.kuleuven.ac.be\&> .RS 4 Author. .RE .PP \fBBernd Porr\fR <\&tech@linux-usb-daq.co.uk\&> .RS 4 Author. .RE .PP \fBIan Abbott\fR <\&abbotti@mev.co.uk\&> .RS 4 Author. .RE .PP \fB\('Eric Piel\fR <\&piel@delmic.com\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br Copyright \(co 1998-2003 David Schleef .br Copyright \(co 2001-2003, 2005, 2008 Frank Mori Hess .br Copyright \(co 2002-2003 Herman Bruyninckx .br Copyright \(co 2012 Bernd Porr .br Copyright \(co 2012 Ian Abbott .br Copyright \(co 2012, 2015 \('Eric Piel .br .PP This document is part of Comedilib. In the context of this document, the term "source code" as defined by the license is interpreted as the XML source. .PP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the License. .PP This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. .PP You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. .sp