The example made it look like the user had to use global variables, which may
cause a poor first time impression. Make it clear that there is multiple ways to
access a pin.
- Make error more consistent and more helpful. Not all errors are wrapped yet
but a fair part is now.
- Remove the 'first' pattern in i2c, spi, uart and make it work.
- Add allwinner.Pin.wrap() for coherence with PinPL and bcm283x.Pin.
- headers.All() return a copy.
Ran:
git sed 's/pio/periph/g
git sed 's/gperiph/gpio/g'
git sed 's/Gperiph/Gpio/g'
git sed 's/PIO/Periph/g'
git sed 's/GPeriph/GPIO/g'
git mv pio.go periph.go
git mv pio_test.go periph_test.go
cd cmd
git mv pio-info periph-info
git mv pio-setup periph-setup
where 'git sed' is an alias to run sed over all files in git ls-files.
Fixes#11.