mirror of https://github.com/periph/devices
periph: Remove Type; gpio: improve pin registering (#48)
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)pull/1/head
parent
508e7b6b50
commit
495d261bae
Loading…
Reference in New Issue