func SetErrorChecking(check bool) {
	errorChecking = check
}
Set error checking. This should be called before pin assignments.
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
}
func GetDefinedPins() HardwarePinMap {
	return definedPins
}
func CloseAll() {
	if driver == nil {
		return
	}
	driver.Close()
}
func GetPin(pinName string) (Pin, error) {
	pl := strings.ToLower(pinName)
	for pin, pinDef := range definedPins {
		for _, name := range pinDef.names {
			if strings.ToLower(name) == pl {
				return pin, nil
			}
		}
	}
	return Pin(0), fmt.Errorf("Could not find a pin called %s", pinName)
}
func GetPinWithMode(cname string, mode PinIOMode) (pin Pin, e error) {
	p, e := GetPin(cname)
	if e != nil {
		return
	}
	e = PinMode(p, mode)
	return p, e
}