/libmcp23016

Linux userspace driver for Microchip MCP23016 I/O expanders

Primary LanguageCGNU Lesser General Public License v2.1LGPL-2.1

libmcp23016

libmcp23016 provides a simple and straightforward API for accessing Microchip MCP23016 I/O expanders from userspace. It relies on the libgpiod and libi2cd libraries to interface with the Linux kernel.

libmcp23016 documentation is hosted on GitHub Pages. A code coverage report is also available.

Installation

Note: These instructions assume you are installing from a source distribution and have a working Linux installation (most distributions are supported) with GCC and GNU Autotools installed. If installing from source control, see HACKING.md.

libgpiod and libi2cd are required and should be installed using the system package manager (eg. libgpiod-dev and libi2cd-dev on Debian-based distributions via apt-get).

cmocka is required for building tests and should also be installed using the system package manager (eg. libcmocka-dev on Debian-based distributions via apt-get).

If you wish to build without tests, the --disable-tests option may be passed to configure:

$ ./configure --disable-tests

To build and install, issue the following:

$ ./configure
$ make all
$ make check
$ make install

By default, make install will install files in /usr/local, which may require superuser privileges.

Hacking

Pull requests are welcome! See HACKING.md for more details.

License

libmcp23016 is distributed under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. See COPYING for more details.