COMEDI_GET_SUBDEVICE(3)
π COMEDI_GET_SUBDEVICE π
okay bestie, welcome to the Comedi reference β this is section 3 of the manual, and today's main character is comedi_get_subdevice_type, the little function that tells you what kind of subdevice you're dealing with. no cap.
β¨ NAME β¨
comedi_get_subdevice_type β type of subdevice π¦
πΈ SYNOPSIS πΈ
#include <comedilib.h>
int comedi_get_subdevice_type(comedi_t * device,
unsigned int subdevice);
like, include the header, call the function, that's the whole vibe β¨
π DESCRIPTION π
so the function comedi_get_subdevice_type returns an integer describing the type of subdevice that belongs to the comedi device device and has the subdevice index subdevice. simple as that, fr fr.
and the comedi_subdevice_type enum specifies the possible values for the subdevice type β that's where all the actual answers live. iykyk. π
π RETURN VALUE π
it returns the subdevice type, or -1 if there is an error. yes literally just -1, no extra crumbs. check your errno energy accordingly. π
π«Ά AUTHORS π«Ά
the icons who built this:
- David Schleef <ds@schleef.org> β Author.
- Frank Mori Hess <fmhess@users.sourceforge.net> β Author.
- Herman Bruyninckx <Herman.Bruyninckx@mech.kuleuven.ac.be> β Author.
- Bernd Porr <tech@linux-usb-daq.co.uk> β Author.
- Ian Abbott <abbotti@mev.co.uk> β Author.
- Γric Piel <piel@delmic.com> β Author.
not me getting emotional over a contributor list. π₯Ή
π COPYRIGHT π
π Copyright Β© 1998-2003 David Schleef π Copyright Β© 2001-2003, 2005, 2008 Frank Mori Hess π Copyright Β© 2002-2003 Herman Bruyninckx π Copyright Β© 2012 Bernd Porr π Copyright Β© 2012 Ian Abbott π Copyright Β© 2012, 2015 Γric Piel
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.
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.
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.
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.
love that for us: LGPL v2.1, free to share, free to remix, but no warranty bestie, zero, none, nada. π
and that's the whole page! this one shipped from Comedi on 03/20/2026, and if you wanna cite it in your bibliography (slay, academic queen), it's page COMEDI_GET_SUBDEVICE(3). bye bestie, go read your subdevice types πβ¨π
π¦ where this page comes from
- ubuntu resolute: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- ubuntu stonking: libcomedi-dev 0.11.0+5-1.3build6 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms