Version 2.2.0 is released!

This is a polish and features update. I know a v3 was promised but we decided to punt on breaking changes since there was too much great stuff to bake into the v2 branch.

Historical note: periphextra and hostextra.Init() is deprecated.

The new release contains 79 changes by 7 contributors for a diff stat of 235 files changed, 9279 insertions(+), 3103 deletions(-).

Hardware support


  • gpioreg: The GPIO registry had intensive structural changes in preparation for support of dynamic GPIOs, e.g. over USB. It completely discarded the principle of pin numbers, and only refers to pin names. Number-based aliases are still kept, but they need to be the decimal textural string representation. Added Unregister.
    • Warning: The primary side effect is that alias evaluation via gpio.RealPin may have to be done in places where it ‘happened to work’ previously.
  • conn: Removed a ton of indirect dependencies on reflect. This is to make conn essentially ‘reflect-free’, which would enable more embedded uses cases.
  • Added String() to all objects, in preparation to requiring it in conn.Resource.
  • Refactored all examples to be copy-pastable.
  • periph: Added undocumented support for a new method After(), which enables significantly more parallelism in driver loading. This function will be added to periph.Driver in v3.
  • cmd: Added support for a new build tag periphextra. This makes the executables use hostextra.Init() instead of host.Init().
    • Warning: If you use a pattern like go build ./cmd/periph-info/main.go, this will not work anymore as each executable is now multiple source files. The correct way is go install
  • gpiotest: Added PinPWM and LogPinIO.
  • onewire-list to display registered 1-wire buses.

Special thanks

I want to give a special thank to all the contributors that made this release possible!

I (@maruel) did the rest, including the release process and the gohci test lab.

Follow for news and updates!