func callWiringSetup(flags int) error { if flags&SETUP_WIRING == SETUP_WIRING { C.wiringPiSetup() fmt.Println("testing") return nil } else if flags&SETUP_GPIO == SETUP_GPIO { C.wiringPiSetupGpio() return nil } else if flags&SETUP_PHYS == SETUP_PHYS { C.wiringPiSetupPhys() return nil } else if flags&SETUP_SYS == SETUP_SYS { C.wiringPiSetupSys() return nil } else { return errors.New("No setup flag set") } }
func WiringPiSetup() error { if -1 == int(C.wiringPiSetup()) { return errors.New("wiringPiSetup failed to call") } return nil }
func WiringPiSetup() { if -1 == int(C.wiringPiSetup()) { panic("Failed to setup Pi") } }