Working on iso

This commit is contained in:
Kyle Lemons
2012-04-16 00:18:53 -04:00
parent 96ca30cdbb
commit acb3aed8c3
2 changed files with 24 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ package usb
import "C"
import (
"log"
"fmt"
"reflect"
"runtime"
@@ -58,6 +59,7 @@ func (d *Device) Reset() error {
}
func (d *Device) Control(rType, request uint8, val, idx uint16, data []byte) (int, error) {
log.Printf("control xfer: %d:%d/%d:%d %x", idx, rType, request, val, string(data))
dataSlice := (*reflect.SliceHeader)(unsafe.Pointer(&data))
n := C.libusb_control_transfer(
d.handle,