Linux Simple I/O Library
libsimpleio is an attempt to encapsulate (as much as possible) the
ugliness of Linux I/O device access. It provides services for the following
types of I/O devices:
I/O Subsystem A/D (Analog to Digital) Converter Devices
I/O Subsystem D/A (Digital to Analog) Converter Devices
- GPIO (General Purpose Input/Output) Pins
- Raw HID (Human Interface Device) Devices
- I2C (Inter-Integrated Circuit) Bus Devices
LINX Remote I/O Devices
- PWM (Pulse Width Modulated) Output Devices
- Serial Ports
- SPI (Serial Peripheral Interface) Bus Devices
- Stream Framing
- TCP and UDP over IPv4 Network Devices
- Watchdog Timer Devices
Although libsimpleio was originally intended for Linux microcomputers
such as the Raspberry Pi, it can also be useful on larger desktop Linux
The C wrapper functions exported by libsimpleio all follow the same
- All C wrapper functions are proper procedures (void f() in
- All input arguments of primitive types (int, float, etc.)
are passed by value.
- All output arguments of primitive types are passed by reference (int
*, float *, etc.).
- All composite types are passed by reference.
- int32_t is used wherever possible for int and
All of the C wrapper functions are declared between _BEGIN_STD_C
and _END_STD_C for C++. Binding modules are provided for Ada, C#,
Java, and Free Pascal. Additional source code libraries are provided for Ada,
C++, C#, Java, and Free Pascal that define OOP (Object Oriented Programming)
classes for libsimpleio.
- 9 January 2019 -- Continued working on the Ada Remote I/O code. Continued
working on the Pascal Remote I/O code. Compiling Pascal Remote I/O client
programs on Windows is now supported.
- 16 January 2019 -- The C wrapper function source files have been moved to
the c/ subdirectory. The source code is now published on GitHub at https://github.com/pmunts/libsimpleio.
The old repository at http://git.munts.com
(which actually just mirrors a private Subversion repository and then pushed to
GitHub) will be maintained, but you should clone from GitHub, which will be
- 8 February 2019 -- Reworked PWM device handling for the Linux 4.19 kernel.
Cleaned up some stale links and commands in the user manual. Cleaned up some
loose ends in the MY-BASIC
bindings and example programs.
- 12 March 2019 -- The Debian native packages now depend on
libhidapi-dev, for Remote I/O over USB raw HID.
- 10 June 2019 -- Material from the Controlling I/O Devices with Ada using
the Remote I/O Protocol educational tutorial at the Ada-Europe 2019 conference is available at http://git.munts.com/ada-remoteio-tutorial.
- 18 July 2019 -- Packages for Debian 10 (Buster) are now available at
- 5 August 2019 -- Started adding .Net Core example programs using RemObjects Elements.
- 8 January 2020 -- Added LINUX_errno(). Added libmodbus bindings and objects for Ada.
The user manual for libsimpleio is available at http://git.munts.com/libsimpleio/doc/UserManual.pdf
The man pages specifying the libsimpleio API are available at
The source code is available at:
Use the following command to clone it:
git clone https://github.com/pmunts/libsimpleio.git
Prebuilt packages for Debian Linux are
Questions or comments to Philip Munts firstname.lastname@example.org
I am available for custom system development (hardware and software) of
products using ARM Linux or other microcomputers.