This commit is contained in:
Kyle Lemons
2012-03-26 22:51:47 -07:00
parent 86ebf94158
commit 2da2ce1e17
5 changed files with 12 additions and 11 deletions

View File

@@ -1,8 +1,8 @@
package main
import (
"fmt"
"flag"
"fmt"
"log"
"github.com/kylelemons/gousb/usb"

View File

@@ -90,6 +90,7 @@ func (d *Device) Reset() error {
}
var ControlTimeout = 5 * time.Second
func (d *Device) Control(rType, request uint8, val, idx uint16, data []byte) (int, error) {
dataSlice := (*reflect.SliceHeader)(unsafe.Pointer(&data))
n := C.libusb_control_transfer(