• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

CI/travis/H17-Jun-2020-1,306962

bindings/H03-May-2022-6,9355,130

cmake/H17-Jun-2020-193175

deps/wingetopt/H17-Jun-2020-

doc/H03-May-2022-813806

examples/H03-May-2022-1,8401,265

iiod/H03-May-2022-4,2853,207

libini/H03-May-2022-349225

man/H03-May-2022-816654

tests/H03-May-2022-4,3393,432

xml/H17-Jun-2020-196192

.codespell-whitelistH A D17-Jun-202014 43

.gitignoreH A D17-Jun-2020178 2217

.gitmodulesH A D17-Jun-2020100 43

.prospector.ymlH A D17-Jun-20201.4 KiB5746

.pylintrcH A D17-Jun-202016.2 KiB531381

.travis.ymlH A D17-Jun-20206.6 KiB181169

CODE_OF_CONDUCT.mdH A D17-Jun-20203.3 KiB7757

CONTRIBUTING.mdH A D17-Jun-20202.3 KiB3727

Contributors.mdH A D17-Jun-20204.3 KiB11197

Distribution.xml.cmakeinH A D17-Jun-2020700 2120

Doxyfile.inH A D17-Jun-202080 KiB1,8541,431

README.mdH A D17-Jun-202011.1 KiB5540

README_BUILD.mdH A D17-Jun-20203.2 KiB8269

appveyor.ymlH A D17-Jun-202011.1 KiB177157

backend.cH A D17-Jun-20201.7 KiB8559

buffer.cH A D17-Jun-20208.1 KiB330240

channel.cH A D17-Jun-202021.7 KiB894736

context.cH A D17-Jun-202011 KiB492400

debug.hH A D17-Jun-20202.9 KiB10466

device.cH A D17-Jun-202026.7 KiB1,195996

dns_sd.cH A D17-Jun-20207.4 KiB310225

dns_sd_avahi.cH A D17-Jun-20206.7 KiB257181

dns_sd_bonjour.cH A D17-Jun-20206.9 KiB251183

dns_sd_windows.cH A D17-Jun-20207.4 KiB266201

iio-config.h.cmakeinH A D17-Jun-2020842 3327

iio-lock.hH A D17-Jun-2020964 318

iio-private.hH A D17-Jun-20209.2 KiB324229

iio.hH A D17-Jun-202074.5 KiB1,868425

iiod-client.cH A D17-Jun-202015 KiB694548

iiod-client.hH A D17-Jun-20203 KiB7247

libiio.iss.cmakeinH A D17-Jun-20204.1 KiB7160

libiio.pc.cmakeinH A D17-Jun-2020281 1310

libiio.rules.cmakeinH A D17-Jun-2020140 21

local.cH A D17-Jun-202047.6 KiB2,1861,728

lock.cH A D17-Jun-20201.8 KiB9163

mainpage.doxH A D17-Jun-202016.6 KiB278211

mdns.hH A D17-Jun-202037.8 KiB1,203932

network.cH A D17-Jun-202033.2 KiB1,5311,185

network.hH A D17-Jun-20203.6 KiB12567

properties.rc.cmakeinH A D17-Jun-2020914 2624

scan.cH A D17-Jun-20204.8 KiB234177

serial.cH A D17-Jun-202015.3 KiB657502

sort.cH A D17-Jun-20203.1 KiB9443

sort.hH A D17-Jun-20201 KiB298

usb.cH A D17-Jun-202030.4 KiB1,298989

utilities.cH A D17-Jun-20207 KiB324221

xml.cH A D17-Jun-202011.6 KiB498410

README.md

1# libiio
2
3Library for interfacing with Linux IIO devices
4
5libiio is 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 or Ethernet or Serial.
6
7Although libiio was primarily developed by Analog Devices Inc., it is an active open source library, which many people have contributed to. The library is released under the GNU Lesser General Public License (LGPL), version 2.1 or (at your option) any later version, this open-source license allows anyone to use the library, on any vendors processor/FPGA/SoC, which may be controlling any vendors peripheral device (ADC, DAC, etc) either locally or remotely. This includes closed or open-source, commercial or non-commercial applications (subject to the LGPL license freedoms, obligations and restrictions). The examples and test applications (sometimes referred to as the iio-utils) are released separately under the GNU General Public License (GPL) version 2.0 (at your option) any later version.
8
9Library License : [![Library License](https://img.shields.io/badge/license-LGPL2+-blue.svg)](https://github.com/analogdevicesinc/libiio/blob/master/COPYING.txt)
10Tests/Examples License : [![Application License](https://img.shields.io/badge/license-GPL2+-blue.svg)](https://github.com/analogdevicesinc/libiio/blob/master/COPYING_GPL.txt)
11Latest Release : [![GitHub release](https://img.shields.io/github/release/analogdevicesinc/libiio.svg)](https://github.com/analogdevicesinc/libiio/releases/latest)
12Downloads :  [![Github All Releases](https://img.shields.io/github/downloads/analogdevicesinc/libiio/total.svg)](https://github.com/analogdevicesinc/libiio/releases/latest)
13
14Scans : [![Coverity Scan Build Status](https://img.shields.io/coverity/scan/4796.svg)](https://scan.coverity.com/projects/analogdevicesinc-libiio)
15Release docs: [![Documentation](https://codedocs.xyz/analogdevicesinc/libiio.svg)](http://analogdevicesinc.github.io/libiio/)
16Issues : [![open bugs](https://img.shields.io/github/issues/analogdevicesinc/libiio.svg)](https://github.com/analogdevicesinc/libiio/issues)
17[![closed bugs](https://img.shields.io/github/issues-closed/analogdevicesinc/libiio.svg)](https://github.com/analogdevicesinc/libiio/issues?q=is%3Aissue+is%3Aclosed)
18
19Support:<br>
20If you have a question about libiio and an Analog Devices IIO kernel driver please ask on : [![EngineerZone](https://img.shields.io/badge/chat-on%20EngineerZone-blue.svg)](https://ez.analog.com/linux-device-drivers/linux-software-drivers). If you have a question about a non-ADI devices, please ask it on [github](https://github.com/analogdevicesinc/libiio/issues).
21
22As with many open source packages, we use [GitHub](https://github.com/analogdevicesinc/libiio) to do develop and maintain the source, and [Travis CI](https://travis-ci.com/) and [Appveyor](https://www.appveyor.com/) for continuous integration.
23  - If you want to just use libiio, we suggest using the [latest release](https://github.com/analogdevicesinc/libiio/releases/latest).
24  - If you think you have found a bug in the release, or need a feature which isn't in the release, try the latest **untested** binaries from the master branch and check out the [documentation](https://codedocs.xyz/analogdevicesinc/libiio/) based on the master branch. We provide builds for a few operating systems. If you need something else, we can most likely add that -- just ask.
25
26| Operating System        | GitHub master status  | Version |  Primary Installer Package  | Alternative Package, tarball or zip |
27|:-----------------------:|:---------------------:|:-------:|:-------------------:|:--------------:|
28| Windows                 | [![Windows Status](https://ci.appveyor.com/api/projects/status/github/analogdevicesinc/libiio?svg=true)](https://ci.appveyor.com/project/analogdevicesinc/libiio/branch/master) | Windows 10<br />Windows 8.1<br />Windows 8<br />Windows 7 | [![Latest Windows installer](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/win_box.png)](https://ci.appveyor.com/api/projects/analogdevicesinc/libiio/artifacts/libiio-setup.exe?branch=master) | [![Latest Windows zip](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/win_box.png)](https://ci.appveyor.com/api/projects/analogdevicesinc/libiio/artifacts/libiio.zip?branch=master) |
29| OS X                    |  [![OSX Status](https://api.travis-ci.org/analogdevicesinc/libiio.svg?branch=master&label=osx&passingTex=foo)](https://travis-ci.org/analogdevicesinc/libiio) |  OS X Mojave <br />(v 10.14) | [![OS-X package 10.14](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/osx_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-darwin-10.14.4.pkg) | [![OS-X tarball 10.14](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/osx_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-darwin-10.14.4.tar.gz) |
30|                         |                     |  OS X High Sierra <br />(v 10.13) | [![OS-X package 10.13](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/osx_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-darwin-10.13.6.pkg) | [![OS-X tarball 10.13](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/osx_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-darwin-10.13.6.tar.gz) |
31|                    |                     | macOS Sierra<br />(v 10.12) | [![OS-X package 10.12](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/osx_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-darwin-10.12.6.pkg) | [![OS-X tarball 10.12](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/osx_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-darwin-10.12.6.tar.gz) |
32| Linux     | [![Linux Status](https://api.travis-ci.org/analogdevicesinc/libiio.svg?branch=master&label=linux)](https://travis-ci.org/analogdevicesinc/libiio) | Ubuntu Bionic Beaver<br />(v 18.04)<sup>1</sup>  | [![Debian](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/deb.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-ubuntu-18.04-amd64.deb) | [![RPM File](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/rpm.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-ubuntu-18.04-amd64.rpm) [![tar.gz](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/linux_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-ubuntu-18.04-amd64.tar.gz) |
33|  |  | Ubuntu Xenial Xerus<br />(v 16.04)<sup>1</sup> | [![Debian](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/deb.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-ubuntu-16.04-amd64.deb) | [![RPM File](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/rpm.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-ubuntu-16.04-amd64.rpm)  [![tar.gz file](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/linux_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-ubuntu-16.04-amd64.tar.gz) |
34|  |  | Raspbian Stretch <br />(v 9) | [![Debian](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/deb.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-raspbian-9-armhf.deb) | [![RPM File](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/rpm.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-raspbian-9-armhf.rpm) [![tar.gz file](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/linux_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-raspbian-9-armhf.tar.gz) |
35|  |  | Raspbian Jessie <br />(v 8) | [![Debian](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/deb.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-raspbian-8-armhf.deb) | [![RPM File](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/rpm.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-raspbian-8-armhf.rpm) [![tar.gz file](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/linux_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-raspbian-8-armhf.tar.gz) |
36|  |  | CentOS 7  | [![RPM File](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/rpm.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-centos-7-x86_64.rpm)  | [![Debian](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/deb.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-centos-7-x86_64.deb) [![tar.gz](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/linux_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-centos-7-x86_64.tar.gz) |
37|  |  | CentOS 6  | [![RPM File](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/rpm.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-centos-6.10-x86_64.rpm) |  [![Debian](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/deb.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-centos-6.10-x86_64.deb) [![tar.gz](https://raw.githubusercontent.com/wiki/analogdevicesinc/libiio/img/linux_box.png)](http://swdownloads.analog.com/cse/travis_builds/master_latest_libiio-centos-6.10-x86_64.tar.gz) |
38
39If you use it, and like it - please let us know. If you use it, and hate it - please let us know that too. The goal of the project is to try to make Linux IIO devices easier to use on a variety of platforms. If we aren't doing that - we will try to make it better.
40
41Feedback is appreciated (in order of preference):
42
43  * [Github trackers](https://github.com/analogdevicesinc/libiio/issues) for bugs, improvements, or feature requests
44  * [Analog Devices web forums](https://ez.analog.com/community/linux-device-drivers/linux-software-drivers) for general help on libiio and/or ADI Linux IIO drivers
45  * [The IIO mailing list](http://vger.kernel.org/vger-lists.html#linux-iio) for questions about other Linux IIO drivers, or kernel-specific IIO questions
46
47Weblinks:
48  * About IIO: https://wiki.analog.com/software/linux/docs/iio/iio
49  * API Documentation: http://analogdevicesinc.github.io/libiio/
50  * Libiio : http://wiki.analog.com/resources/tools-software/linux-software/libiio
51  * Libiio internals : http://wiki.analog.com/resources/tools-software/linux-software/libiio_internals
52
531. The Ubuntu packages are known to work on their Debian counterpart releases.
54
55

README_BUILD.md

1# Build instructions for libiio
2
3## Install Prerequisites/Dependencies
4
5Basic system setup
6```shell
7analog@precision:~$ sudo apt-get update
8analog@precision:~$ sudo apt-get install build-essential
9```
10Install Prerequisites
11```shell
12analog@precision:~$ sudo apt-get install libxml2-dev bison flex libcdk5-dev cmake
13```
14Install Backends
15```shell
16analog@precision:~$ sudo apt-get install libaio-dev libusb-1.0-0-dev
17analog@precision:~$ sudo apt-get install libserialport-dev libavahi-client-dev
18```
19Install to build doc
20```shell
21analog@precision:~$ sudo apt-get install doxygen graphviz
22```
23Install to build python backends
24```shell
25analog@precision:~$ sudo apt-get python3 python3-pip python3-setuptools
26```
27Install to Read local context attributes from `/etc/libiio.ini`
28```shell
29analog@precision:~$ git clone https://github.com/pcercuei/libini.git
30analog@precision:~$ cd libini
31analog@precision:~/libini$ mkdir build && cd build && cmake ../ && make && sudo make install
32```
33## Clone
34```shell
35analog@precision:~$ git clone https://github.com/analogdevicesinc/libiio.git
36analog@precision:~$ cd libiio
37```
38
39## Configure & Build
40
41when configuring libiio with cmake, there are a few optional settings that you can use to control the build.
42
43Cmake Options       | Default | Description                                    |
44------------------- | ------- | ---------------------------------------------- |
45`CSHARP_BINDINGS`   | OFF | Install C# bindings                                |
46`PYTHON_BINDINGS`   | OFF | Install PYTHON bindings                            |
47`WITH_DOC`          | OFF | Generate documentation with Doxygen and Sphinx     |
48`WITH_MAN`          | OFF | Generate and install man pages                     |
49`WITH_TESTS`        |  ON | Build the test programs                            |
50`WITH_LOCAL_CONFIG` |  ON | Read local context attributes from /etc/libiio.ini |
51`ENABLE_PACKAGING`  | OFF | Create .deb/.rpm/.tar.gz via 'make package'        |
52`INSTALL_UDEV_RULE` |  ON | Install a udev rule for detection of USB devices   |
53
54Which backends the library supports is dependent on the build system, but can be overridden.
55(If cmake finds libusb, it will use it, unless turned off manually)
56
57Cmake Options          | Depends on    | Description                     |
58---------------------- | ------------- | ------------------------------- |
59`WITH_XML_BACKEND`     | libxml2       | Enable the XML backend          |
60`WITH_USB_BACKEND`     | libusb        | Enable the libusb backend       |
61`WITH_SERIAL_BACKEND`  | libserialport | Enable the Serial backend       |
62`WITH_NETWORK_BACKEND` |               | Supports TCP/IP                 |
63`WITH_LOCAL_BACKEND`   | Linux         | Enables local support with iiod |
64
65
66```shell
67analog@precision:~/libiio$ mkdir build
68analog@precision:~/libiio/build$ cd build
69analog@precision:~/libiio/build$ cmake ../ -DPYTHON_BINDINGS=ON
70analog@precision:~/libiio/build$ make -j$(nproc)
71```
72
73## Install
74```shell
75analog@precision:~/libiio/build$ sudo make install
76```
77
78Note: Some things (specifically building doc)  need to find libiio or the bindings on path.
79That means that you configure (with -DWITH_DOC=OFF), build, install, configure
80(with -DWITH_DOC=ON), build again to get the doc. If you have issues, please ask.
81
82