No functional change.
I plan to add more units, and eventually this could make sense to split it off
into its own package. For now split it into its own source file.
In practice I want to be able for gpioreg.Register() to eventually enforce that
Halt() is implemented on gpio.Pin, so that three's a consistent way to stop
gpiostream operations or PWM() output. This requires the interface to live in
conn, not in devices.
Do not use go1.9 type alias to not break compatibility with older Go version
yet.
- Disallow writing a buffer longer than the number used. Silently
dropping data is always annoying to debug. Clear failure is better.
- Rename private variables and document them better.
- Replace 'lights' by 'pixels'. This is more precise.
- cmd/bmxx80 now can read any of these 3 devices.
- Rewrite the driver to support all 3 devices. More devices of the family (like
the bme680) could be easily added.
- Add -ia to bmx280smoketest
Fix#155
- bme280: fix hang in Halt() if SenseContinuous() listener is hung.
- bmp180: Add unit tests; increase test coverage to 96%.
- bmp180: Remove Reset(). There's no known use case.
- bmp180: Implement SenseContinuous().
- Consistently wrap errors in both packages.
- Various typos.
It is still possible to get a pin by its logical number using the string
representation, but the function is not exported anymore.
This simplifies the interface, one less way to do the same thing.
- devices: Add SenseContinuous() to Environmental.
- devices: Add Device to Display and Environmental.
- devices: Remove fmt.Stringer from Device.
- devices: Add more type assertions to variaous devices and corresponding unit test.
- bme280: Unexport the Standby parameter.
- bme280: Have SenseContinuous accept time.Duration period instead.
- bme280: Do not enable automatic sensing upon initialization.
- bme280: Use forced mode by default.
- bme280smoketest: improved.
- Inline golang.org/x/image/font/basicfont in cmd/ssd1306.
- Inline a text rendering in ssd1306smoketest.
- Update ssd1306 example to be a comment, so golang.org/x/image is not imported
even in the test.
Done as part of #146.
Now that v1.0.0 is being released and will use a proper versioning mechanism,
there's no need for this warning.
Clients will be able to use http://github.com/golang/dep to version this
library.
As people like to copy paste code, make sure that the semantic of the variable
names is always relevant w.r.t. the object they refer to. In particular, do not
use 'bus' to refer to an spi.Port or spi.PortCloser, as this is blur the
distinction.
Also rename a few fooName to fooID.
Improve support for RPi 1, 2, 3, add support for Zero, Zero Wireless and the Compute Modules.
Removes rpi.Version since it doesn't make much sense anymore, as it more closely related to
the CPU than the actual board.
Fixes#139
This clarifies the difference on ownership and makes it clear that DevParams()
is essentially a 'connection factory'.
The flow is:
Bus -> Port -> Conn
Doing this caught inconsistencies in the unit tests. Made the structs in spitest
enforce the fact that DevParams() can only be called once.
In a follow up, I'll rename a lot of 'bus' to 'port' to be more consistent but
punting to not make this change unreviewable.
This makes it much more generic and extensible. This will enable addressing
issue #125.
Refuse registering an high and low priority pins with different numbers but same
name and reverse.
- This enables more complex use case like write-then-read, 3-wire SPI and when
the number of bits per word changes accross packets.
- Remove the transparent Tx() buffer cutting, the Raspberry Pi 3 spi_bcm2835
driver asserts the CS line even if csChange = 0 on the last packet. This broke
some use case (like FLIR Lepton).
spi-io: improve with more use cases. Used for adhoc testing of the SPI bus and
looking at the results over an oscilloscope.
- Increase test coverage to 100%.
- Add ssd1306smoketest.
- Complete SPI 4-wire implementation.
Differential update reduces the amount of data sent over the I²C/SPI bus at the
(small) cost of slightly more CPU usage. On many platform, I²C default transfert
speed is only 100KHz so when only a small section of the display is updated,
this can lead to significant performance improvement.
For now only page based differential update is used, as column based offset
corrupt the display. This still results in large savings.
- Rename Image to VerticalLSB, so that the 3 other encodings (vertical MSB,
horizontal LSB and MSB) can be added at a later point if ever needed without
breaking the API.
- Use .Pix, .Stride and .Rect so it is more similar to how stdlib image package
does it.
- Export the color model properly as BitModel.
- Remove frivolous methods.
- Allow both app and device drive set max bus speed.
- Make DevParams callable only exactly once.
- sysfs-spi: make SPI implement io.Reader.
- sysfs-spi: Fix Tx() with write only or read only.
This shortens OpenByName() to Open() and removes OpenByNumber(). The concept of
number is not removed, it's still possible to open a bus by number, but a base10
string representation of the number is now needed. In practice, I haven't found
a real use for OpenByNumber().
This simplify the API surface, less functions leads to simpler to understand
API.
This is a breaking change.
- conntest: Small coherency fixes along the way.
- conntest: Add Discard. Useful for zero filled tests.
- reg: Improve testing.
- CONTRIBUTING.md: fix a typo.