Package pinreg is a registry for the physical headers (made up of pins) on a host.
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 pin.Pin.
IsConnected returns true if the pin is on a header.
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.
Register registers a physical header.
It automatically registers all gpio pins to gpioreg.
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.