gpioreg: Remove ByNumber() (#153)

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.
pull/1/head
M-A 9 years ago committed by GitHub
parent 128c086c75
commit e235d09bc8

@ -20,7 +20,7 @@ func Example() {
if _, err := host.Init(); err != nil {
log.Fatalf("failed to initialize periph: %v", err)
}
dev, err := New(gpioreg.ByNumber(6), gpioreg.ByNumber(12))
dev, err := New(gpioreg.ByName("GPIO6"), gpioreg.ByName("GPIO12"))
if err != nil {
log.Fatalf("failed to initialize tm1637: %v", err)
}

Loading…
Cancel
Save