func GetDefinedPins() HardwarePinMap {
	return definedPins
}
Returns a map of the hardware pins. This will only work once the driver is
set.
package hwio
import (
	"errors"
	"fmt"
	"os"
	"path/filepath"
	"strings"
	"time"
)
type BitShiftOrder byte
const (
	LSBFIRST BitShiftOrder = iota
	MSBFIRST
)
var driver HardwareDriver
var definedPins HardwarePinMap
type assignedPin struct {
	pin    Pin     
	module Module  
}
var assignedPins map[Pin]*assignedPin
var errorChecking bool = true
func init() {
	assignedPins = make(map[Pin]*assignedPin)
	determineDriver()
}
func fileExists(name string) bool {
	_, err := os.Stat(name)
	if err != nil {
		return false
	}
	return true
}
func determineDriver() {
	drivers := [...]HardwareDriver{NewBeagleboneBlackDTDriver(), NewRaspPiDTDriver(), NewOdroidC1Driver()}
	for _, d := range drivers {
		if d.MatchesHardwareConfig() {
			SetDriver(d)
			return
		}
	}
	fmt.Printf("Unable to select a suitable driver for this board.\n")
}
func assertDriver() error {
	if driver == nil {
		return errors.New("hwio has no configured driver")
	}
	return nil
}
func SetDriver(d HardwareDriver) {
	driver = d
	e := driver.Init()
	if e != nil {
		fmt.Printf("Could not initialise driver: %s", e)
	}
	definedPins = driver.PinMap()
}
func GetDriver() HardwareDriver {
	return driver
}