make addr() part of EndpointInfo
This commit is contained in:
@@ -374,11 +374,7 @@ func (libusbImpl) alloc(d *libusbDevHandle, ep *EndpointInfo, timeout time.Durat
|
||||
return nil, fmt.Errorf("libusb_alloc_transfer(%d) failed", isoPackets)
|
||||
}
|
||||
xfer.dev_handle = (*C.libusb_device_handle)(d)
|
||||
addr := ep.Number & endpointNumMask
|
||||
if ep.Direction == EndpointDirectionIn {
|
||||
addr |= endpointDirectionMask
|
||||
}
|
||||
xfer.endpoint = C.uchar(addr)
|
||||
xfer.endpoint = C.uchar(ep.addr())
|
||||
xfer.timeout = C.uint(timeout / time.Millisecond)
|
||||
xfer._type = C.uchar(ep.TransferType)
|
||||
xfer.num_iso_packets = C.int(isoPackets)
|
||||
|
Reference in New Issue
Block a user