INTRO(3LIBIIO) | INTRO(3LIBIIO) |
libiio-0.21 - introduction to libiio, a library for interacting with the Linux IIO subsystem and devices
#include <iio.h>
cc file.c -liio
The define IIO_CHECK_REG will warn if return values are not checked. Most libiio functions, if/when a failure occurs will return a negative error number. this warning will ensure these error numbers are looked at. There is nothing more frustraining than calling a function, debugging some hardware, and then eventually realizing there was a typo in an attribute name. This option will force libraries users to at least capture the return value.
cc file.c -DIIO_CHECK_REG -liio
libiio is a library used to interface to the Linux Industrial Input/Output (IIO) Subsystem. The Linux IIO subsystem is intended to provide support for devices that in some sense are analog to digital or digital to analog converters (ADCs, DACs). This includes, but is not limited to ADCs, Accelerometers, Gyros, IMUs, Capacitance to Digital Converters (CDCs), Pressure Sensors, Color, Light and Proximity Sensors, Temperature Sensors, Magnetometers, DACs, DDS (Direct Digital Synthesis), PLLs (Phase Locked Loops), Variable/Programmable Gain Amplifiers (VGA, PGA), and RF transceivers. You can use libiio natively on an embedded Linux target (local mode), or use libiio to communicate remotely to that same target from a host Linux, Windows or MAC over USB, Ethernet or Serial.
The library makes use of C structures and typedefs to promote
portability, and is known to run on various GNU/Linux distributions, macOS,
Windows, and mbed (via tiny-iiod). The main C structures are:
The following routines are part of the library. Consult the Doxygen pages for details on their operation (in the SEE ALSO section).
Scan Functions for scanning available contexts
TopLevel Top-level functions
Context Context
Device Device
Channel Channel
Buffer Buffer
Debug Debug and low-level functions
All error codes are returned as negative number return codes. In these cases, the value can be passed to the iio_strerror routine.
iio_attr(1), iio_info(1), iio_readdev(1), iio_writedev(1), iio_reg(1)
libiio home page:
https://wiki.analog.com/resources/tools-software/linux-software/libiio
libiio code:
https://github.com/analogdevicesinc/libiio
Doxygen for libiio:
https://analogdevicesinc.github.io/libiio/
Kernel Doc:
https://www.kernel.org/doc/html/latest/driver-api/iio/index.html
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
All bugs are tracked at: https://github.com/analogdevicesinc/libiio/issues
The libiio source code and resulting binaries (libraries)
are released and distributed under the GNU Lesser General Public License,
v2.1 or (at your option) any later version.
The libiio test and example application(s) source code and resulting
binaries (executables) are released and distributed under the GNU General
Public License, v2.0 or (at your option) any later version.
The libiio man pages are released and distributed under the Creative
Commons Attribution-ShareAlike 4.0 International Public License.
19 November 2020 | libiio-0.21 |