io/gpio: use string pin identifiers

Pins are labelled with string labels to improve the usability. For
example, GPIO pin 23 can be labelled as "SPI_SCLK" to identify it
with a human readable name. The label later than can be mapped to the
GPIO 23 physical pin on Raspberry Pi and others depending on the pin
layout. String identifiers provide better readability and a more
expressive virtual space of portable names to the gpio package.

Fixes #golang/go#16177.

Change-Id: I120370bd6c60fd9bcc1d8caf4b67b97941607414
Reviewed-on: https://go-review.googlesource.com/24506
Reviewed-by: Matt Aimonetti <mattaimonetti@gmail.com>
Reviewed-by: Johan Euphrosine <proppy@google.com>
Reviewed-by: Jaana Burcu Dogan <jbd@google.com>
Run-TryBot: Jaana Burcu Dogan <jbd@google.com>
2 files changed