spi: Rewrite similar to how i2c was refactored (#120)

Because of the way the SPI bus is exposed via sysfs, do not use the same pattern
as i2c. This may change as more OSes are supported.

Increase test coverage for spi and spitest to 100%.
pull/1/head
M-A 9 years ago committed by GitHub
parent 7464232a5f
commit 6620acdaca

@ -509,7 +509,7 @@ func TestDrawRGBA(t *testing.T) {
//
func Example() {
bus, err := spi.New(-1, -1)
bus, err := spi.OpenByName("")
if err != nil {
log.Fatalf("failed to open SPI: %v", err)
}

Loading…
Cancel
Save