Improve tests - use offsetof to find the position of the iso packet

descriptor in the transfer struct.
This commit is contained in:
Sebastian Zagrodzki
2017-02-16 12:04:10 +01:00
parent 09150fc318
commit 99ec211c43
4 changed files with 370 additions and 13 deletions

View File

@@ -62,7 +62,7 @@ func (e *endpoint) transfer(buf []byte, timeout time.Duration) (int, error) {
}
tt := e.TransferType()
t, err := newUSBTransfer(e.Device.handle, e.EndpointInfo, buf, timeout)
t, err := newUSBTransfer((*deviceHandle)(e.Device.handle), e.EndpointInfo, buf, timeout)
if err != nil {
return 0, err
}