Documentation ¶
Overview ¶
Package pinreg is a registry for the physical headers (made up of pins) on a host.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func All ¶
All contains all the on-board headers on a micro computer.
The map key is the header name, e.g. "P1" or "EULER" and the value is a slice of slice of pin.Pin. For a 2x20 header, it's going to be a slice of [20][2]pin.Pin.
func IsConnected ¶
IsConnected returns true if the pin is on a header.
func Position ¶
Position returns the position on a pin if found.
The header and the pin number. Pin numbers are 1-based.
Returns "", 0 if not connected.
func Register ¶
Register registers a physical header.
It automatically registers all gpio pins to gpioreg.
func Unregister ¶
Unregister removes a previously registered header.
This can happen when an USB device, which exposed an header, is unplugged. This is also useful for unit testing.
Types ¶
This section is empty.