make libusbDevHandle part of alloc()
This commit is contained in:
@@ -133,12 +133,11 @@ func newUSBTransfer(dev *libusbDevHandle, ei EndpointInfo, buf []byte, timeout t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xfer, err := libusb.alloc(isoPackets)
|
xfer, err := libusb.alloc(dev, isoPackets)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
xfer.dev_handle = (*C.struct_libusb_device_handle)(dev)
|
|
||||||
xfer.timeout = C.uint(timeout / time.Millisecond)
|
xfer.timeout = C.uint(timeout / time.Millisecond)
|
||||||
xfer.endpoint = C.uchar(ei.Address)
|
xfer.endpoint = C.uchar(ei.Address)
|
||||||
xfer._type = C.uchar(tt)
|
xfer._type = C.uchar(tt)
|
||||||
|
Reference in New Issue
Block a user