This is a breaking change.
This is closer to how gpio behaves yet different in practice because of the
different challenges.
spi will be updated later to behave the same. Add support for aliases, which is
very useful, and it permits the CLI tools to accept a free form string to
specify the bus name.
- Increase test coverage of i2c and i2ctest to 100%.
- Add i2c.Pins implementation to i2ctest.Playback.
Now each connection can report if the underlying communication channel is
half-duplex or full-duplex.
This information is leveraged by some clients, like memory mapped registers
helper struct, to change their behavior or deny use on certain kind of
communication channel.
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.
periph:
- Type was an approximation to enforce priority ordering. Remove the need for
approximate ordering by improving gpio instead to support out-of-order pin
registration. This has the side effect of increasing parallelism. This saved
~5ms on "gpio-list" runtime (out of 30ms) when run on a Raspberry Pi 3.
gpio:
- Redo RegisterAlias() to support out of order registration.
- Replace Functional() with Aliases(), which is much more generic.
- Unexport PinAlias, it is not necessary anymore.
- Improve error messages by wrapping the error, it helps legibility in case of
errors.
- Remove Unregister(), it will be added back when there's an actual call site.
- Remove the (%d) number on sysfs-gpio and bcm283x since it wasn't useful.
- sysfs-gpio: Fix edge when switching output.
- consistently fix accumulated edged when calling sysfs.Pin.In().
lirc:
- Stop mapping IR_IN and IR_OUT when the pin is not mapped.
periph-smoketest:
- Fix to use host.Init(), otherwise drivers weren't correctly loaded.
Fixes#45
(I think)
- Remove fmt.Stringer and io.Writer from conn.Conn. This makes it compatible
with exp/io.
- Rename i2c.Conn to i2c.Bus since this was confusion. This clarifies the
distinction between a point-to-point connection and a bus.
- Add these to bus specific interfaces, i2c.Bus, spi.Conn, uart.Conn.
Fixes#15.
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.
make the i2c address of bme280 configurable
The address can either be 0x76 or 0x77. It depends on hardware configuration.
If you connect SDO to GND its 0x76
If you connect SDO to V(DDIO) its 0x77.
* Add me to the authors.
* the bme280 cmd uses the new address option
* initialize default addr on definition