COMEDI_DIO_READ(3)
β¨ COMEDI_DIO_READ(3) β¨ β it's giving one single bit π
okay bestie, sit DOWN π
this one lives in the Comedi reference manual, section 3 β the one where we read hardware, but make it tiny.
πΈ NAME πΈ
comedi_dio_read β read a single bit from a digital channel π¦
like, one (1) bit. the smallest lil guy. π
β¨ SYNOPSIS β¨
#include <comedilib.h>
int comedi_dio_read(comedi_t * device, unsigned int subdevice,
unsigned int channel, unsigned int * bit);
π DESCRIPTION π
ok so real talk β comedi_dio_read goes and reads the channel called channel, which belongs to the subdevice subdevice, on the device device. π«Ά
the data value it pulls back gets stored in *bit. that's it, that's the whole plot. π
and guess what β this function is literally equivalent to this:
comedi_data_read(device, subdevice, channel, 0, 0, bit);
no cap. same thing.
now for the plot twist that makes her so iconic: she does not require a digital subdevice, and she does not require a subdevice whose max data value is 1 β she just works anyway. π
β¨
and if you're out here wanting to read a bunch of digital channels at once? bestie, be more efficient and use comedi_dio_bitfield2 instead of calling this function over and over and over. π₯ your CPU will thank you.
π RETURN VALUE π
return values and errors?? same as comedi_data_read, periodt. β (so go read that one, iykyk)
π AUTHORS π
the legends who made this happen, no cap π
- 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.
π COPYRIGHT π
the legal lore, bestie, read it carefully π
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. π (yes, the caps are required, that's just how licenses scream.)
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. π¬
ok that's the whole vibe check, bestie π§π this was Comedi, dated 03/20/2026, and you have absolutely ate this manpage. slay, go read your bits. ππ
π¦ 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