test program

This commit is contained in:
lordwelch 2017-10-26 17:51:30 -06:00
parent 56476d2fe6
commit dec73290ea

View File

@ -33,8 +33,8 @@ func main() {
fmt.Printf("%08b\n", test[0])
test[0] |= LCTRL
fmt.Printf("%08b\n", test[0])
file, err := os.Open("/dev/hidg0", os.O_WRONLY, os.ModePerm)
file2, err2 := os.Open("test", os.O_WRONLY|os.O_CREATE, os.ModePerm)
file, err := os.OpenFile("/dev/hidg0", os.O_WRONLY, os.ModePerm)
file2, err2 := os.OpenFile("test", os.O_WRONLY|os.O_CREATE, os.ModePerm)
fmt.Println(err)
fmt.Println(err2)
binary.Write(file, binary.BigEndian, test[:])