Esempio n. 1
0
File: pi.go Progetto: rafkhan/pi
func doResets(flags int) {
	if flags&RESET_IN == RESET_IN {
		for i := 0; i < 26; i++ {
			C.pinMode(C.int(i), C.INPUT)
		}
	} else if flags&RESET_OUT == RESET_OUT {
		for i := 0; i < 26; i++ {
			C.pinMode(C.int(i), C.OUTPUT)
		}
	}

	if flags&RESET_LOW == RESET_LOW {

	}
}
Esempio n. 2
0
func (l *littleWire) pinMode(pin uint8, mode uint8) error {
	C.pinMode(l.lwHandle, C.uchar(pin), C.uchar(mode))
	return l.error()
}
Esempio n. 3
0
File: pi.go Progetto: rafkhan/pi
func PinMode(p int, m int) {
	C.pinMode(C.int(p), C.int(m))
}
Esempio n. 4
0
//void pinMode(littleWire* lwHandle, unsigned char pin, unsigned char mode);
func (l *LittleWire) PinMode(pin uint8, mode uint8) {
	C.pinMode(l.lwHandle, C.uchar(pin), C.uchar(mode))
}