First version of streaming transfers.
This commit is contained in:
@@ -33,7 +33,7 @@ type usbTransfer struct {
|
||||
// done is blocking until the transfer is complete and data and transfer
|
||||
// status are available.
|
||||
done chan struct{}
|
||||
// submitted is true if this transfer was passed to libusb through submit()
|
||||
// submitted is true if submit() was called on this transfer.
|
||||
submitted bool
|
||||
}
|
||||
|
||||
@@ -110,6 +110,11 @@ func (t *usbTransfer) free() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// data returns the slice containing transfer buffer.
|
||||
func (t *usbTransfer) data() []byte {
|
||||
return t.buf
|
||||
}
|
||||
|
||||
// newUSBTransfer allocates a new transfer structure for communication with a
|
||||
// given device/endpoint, with buf as the underlying transfer buffer.
|
||||
func newUSBTransfer(dev *libusbDevHandle, ei *EndpointInfo, buf []byte, timeout time.Duration) (*usbTransfer, error) {
|
||||
|
Reference in New Issue
Block a user