Cleaning up the old cruft to align on the future

Removing periph.io/x/periph 2022-05-29
Two years ago, I created the new repositories at https://github.com/periph, used with periph.io/x/<pkg>/v3 where <pkg> is one of conn, cmd, devices, or host. I kept the old ones to not break existing users. The problem is that it creates more confusion than anything else and people get stuck on the old code base. As such, I am pushing v3.7.0 that deletes the whole code in the old repository https://github.com/google/periph. If you want to keep using the old code base (which doesn’t support Raspberry Pi 4), stay on periph.

main

Renamed all repositories master branch to main 2021-05-29

Now that GitHub supports transparent redirection, I renamed all the remaining repositories master branches to main.

If you have a local git clone, run:

git branch -m master main
git fetch origin --prune
git branch -u origin/main main
git remote set-head origin -a

A new start

A new layout for Go modules in v3.6.7 2020-12-30

The project is having a make over!

Not only are we leaving 2020 behind, we are also leaving periph.io/x/periph v3.6.7 behind.

Announcing v3.6.5

Let's just hope 2020 ends quickly 2020-12-04

Version 3.6.5 is released!

You’ll notice 3.6.4 and 3.6.3 were released earlier but I never posted a blog post. Sorry about that. It’s been a rough year.

Announcing v3.6.2

Fixing go modules users 2019-08-27
Version 3.6.2 is released! It turns out that adding a go.mod files in v3.5.0 wasn’t a good idea without completely converting to go modules. This fixes go module users that weren’t able to update past v3.4.0. We may add go.mod back in v4.0.0. See the commit description for the gory details. Found bugs? Have questions? File a report at github.com/google/periph/issues. Join the periph.io slack channel to chat with us! Need an account?

Announcing v3.6.1

RPi1 and Rpi Zero GPIO and amd64 2019-08-23

Version 3.6.1 is released!

This is a bug fix release.

Announcing v3.6.0

RPi4 support and more! 2019-07-18

Version 3.6.0 is released!

This is a feature and cleanup release. It adds support for 12 new Raspberry Pi boards, including the 3 new Raspberry Pi 4 boards.

Announcing v3.5.0

go mod, improve MIPS, drop go1.6 2019-02-23

Version 3.5.0 is released!

This is the first release that is go modules friendly. The go.mod is the simplest you can think of, since periph doesn’t depends on any other third party library at the moment.

Go 1.6 and earlier is not supported anymore. This is required to be able to start using the package context.

Announcing v3.4.0

physic types now implement flag.Value 2018-12-28

Version 3.4.0 is released!

This is a feature and bug fix release, the last one for 2018.

Special thanks to NeuralSpaz for his outstanding contributions to the physic package.

This is the last version supporting go1.6 and lower. periph v3.5.0 will require go1.7 or later.

Announcing v3.3.0

Important sysfs SPI and physic constant fixes 2018-11-08

Version 3.3.0 is released!

‼️ This is an important bug fix update. ‼️

We highly recommend to upgrade.

Announcing v3.2.0

Change pin functionality; measure light; run on MIPS 2018-10-14

Version 3.2.0 is released! A lot of things improved in the past 4 months.

This is a feature and bug fix update. Highlights are:

  • Lots of new physics types.
  • Adds support for Allwinner A20 and MIPS.
  • Standardizes pin functionality names.

Announcing v3.1.0

Now with capacitive sensing 2018-07-31

Version 3.1.0 is released!

This is a feature and bug fix update.

Announcing v3.0.0

Leveraging past learnings for the future 2018-06-27

Version 3.0.0 is released!

This is a breaking changes major version bump, refactoring many APIs based on the learnings made in the past year, acquired hindsight by fine tuning drivers and feedback from users.

We do not take breaking users lightly!

Every single breaking change was done thoughtfully. We consider users have the right for an explanation why their time is spent on this, so this document lists the rationale for every single breaking change.

Announcing v2.3.0

physic and FastRead() 2018-05-26

Version 2.3.0 is released!

This is a feature and user improvement update with new packages in preparation for v3. This is the last v2 release (for real!). As of now, the v3 branch has been merged into master so if you go get periph, you will get the v3 changes, not v2.3.0.

Power drive your Raspi

Drive and slew limiting are now configurable 2018-05-13

Periph just gained super powers (in the literal sense) to enable increasing or decreasing the power push on the GPIO pads. This will be available in the next release.

There are 2 output functions that can adjusted:

  • The slew rate limiter, which limits the speed at which the GPIO changes from one level to another.
  • The drive current, which limits how much total power is pushed on the line.

The broadcom processor has flags to configure the physical properties of the GPIO pads. periph’s bcm283x driver now expose a function to configure these. The driver also gained the ability to disable input hysteresis but this is for another post.

The program (attached at the end of this post) runs 4 pulses in 4 different GPIO pad configurations:

  1. 2mA drive with slew limited
  2. 16mA drive with slew limited
  3. 2mA drive with slew unlimited
  4. 16mA drive with slew unlimited

The default is 8mA with slew unlimited.

This screenshot was taken without any load, e.g. nothing connected to the pins except the oscilloscope itself:

Drive unloaded

Announcing v2.2.0

BeagleBone and more! 2018-05-03

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.

gohci got an upgrade

The free CI system for your little computers 2018-05-02

Since my day job is working on continuous integration systems (CI), when I started periph.io I really wanted to have a strong testing system to make sure regressions wouldn’t go undetected.

The challenge is that first, I’m cheap, and second, I needed it to run tests on my Raspberry Pis, macOS and Windows machines without any maintenance, both before and after accepting PRs.

On one Sunday afternoon in November 2016, I hacked up what eventually became gohci.

Towards v3

Polishing the APIs 2017-12-21

Have you found incoherences in the APIs? Does an interface-specific [registry] (/project/design/#interface-specific-registries) needs refactoring or is hard to use? Is a device driver missing options? We are now planning v3 to polish the APIs. This is a major release which will permit small breaking changes, as defined by the compatibility guarantee.

Now is the time to report these issues and voice your opinion! Please file a bug or reach out on #periph on the Gophers slack. You can find the slack invite on the top right of this page.

It is slated for around Q1 of 2018. It is not an hard date, we will release once we feel we reached the desired polish level. You can view the currently slated changes via the [API breaking] (https://github.com/google/periph/labels/API%20breaking) label.

🚄 Reaching 80MHz

How we cranked up GPIO performance in v2.1.0 2017-12-15

One of the key design goal of periph.io is to be as fast as possible while exposing a simple API. For GPIO pins, this means having reliable low latency in the happy path.

In this article, we’ll describe how we:

  • wrote a reproducible benchmark for GPIO that can be used across platforms, which measures output performance by toggling the output low and high continuously as fast as possible ⎍⎍⎍⎍ and for input performance by, unsurprisingly, reading continuously
  • optimized outputs and inputs against the benchmarks
  • determined incorrect optimizations and benchmarking issues
  • determined performance anti-patterns

Are we fast yet?

Announcing v2.1.0

25x speed bump just in time for 🎄 holidays! 2017-12-15

Version 2.1.0 is released!

This is a polish, features and performance update. It includes a 25x (!) GPIO performance improvements, a nice slew of new features and no breaking change.

Announcing v2.0.0

v1.0.0, we barely knew ya! 2017-08-28

Version 2.0.0 is released! It is a major version bump because it contains breaking changes that may require user code changes.

One Year!

One year already, what a ride. 2017-08-27

The idea of the project came up in early 2016 as I (Marc-Antoine) was working on a work-in-progress (WIP) project named dlibox but only in the summer of 2016 I saw that there was real value into making the Hardware Abstraction Layer (HAL) a real project. The working name of the project was pio but everyone agreed it was a bad name. :)