v2.0.0
This is a major update to Circuits.GPIO that modernizes the API, restricts usage
to Nerves and Linux, and updates the Linux/Nerves backend to the Linux GPIO cdev
interface.
It is mostly backwards compatible with Circuits.GPIO v1. Please see PORTING.md
for upgrade instructions.
-
New features
-
Support alternative backends for different operating systems or for
simulated hardware. The Linux cdev backend can be compiled out. -
Circuits.GPIO.open/3is much more flexible in how GPIOs are identified.
Specifying GPIOs by number still works, but it's now possible to specify
GPIOs by string labels and by tuples that contain the GPIO controller name
and index. Seet:gpio_spec/0and theREADME.mdfor details. -
List out available GPIOs with
Circuits.GPIO.enumerate/0. Other helper
functions are available for getting more information about each GPIO too. -
Specify pull modes in general rather than only Raspberry Pis on Linux and
Nerves -
Easily do one-off reads and writes with
Circuits.GPIO.read_one/2and
Circuits.GPIO.write_one/3 -
Improved performance on Nerves and Linux; kernel-applied timestamping of
GPIO input events -
Add
Circuits.GPIO.Diagnosticsto automate runtime testing
-
-
Changes
- More consistent error returns. Unexpected errors return
{:errno, value}
tuples to help correlate errors to low level docs - Deferred loading of the NIF to simplify debugging of GPIO backends.
Segfaults crash on first use ofCircuits.GPIOrather than on load.
- More consistent error returns. Unexpected errors return