Don't skip empty transfers. In isochronous transfers, make sure (#72)
Don't skip empty transfers. Update the fake libusb to honor the endpoint max packet sizes. Update tests that were taking advantage of the fact that libusb allowed unlimited amount of data in any transfer packet.
This commit is contained in:

committed by
GitHub

parent
2dc560e6be
commit
18f4c1d8a7
@@ -44,7 +44,7 @@ func TestNewTransfer(t *testing.T) {
|
||||
tt: TransferTypeBulk,
|
||||
maxPkt: 512,
|
||||
buf: 1024,
|
||||
wantLength: 1024,
|
||||
wantLength: 512,
|
||||
},
|
||||
{
|
||||
desc: "iso out transfer, 3 * 1024B packets",
|
||||
@@ -52,7 +52,15 @@ func TestNewTransfer(t *testing.T) {
|
||||
tt: TransferTypeIsochronous,
|
||||
maxPkt: 3 * 1024,
|
||||
buf: 10000,
|
||||
wantLength: 10000,
|
||||
wantLength: 9216,
|
||||
},
|
||||
{
|
||||
desc: "iso out transfer, 512B packets",
|
||||
dir: EndpointDirectionOut,
|
||||
tt: TransferTypeIsochronous,
|
||||
maxPkt: 512,
|
||||
buf: 2048,
|
||||
wantLength: 2048,
|
||||
},
|
||||
} {
|
||||
xfer, err := newUSBTransfer(ctx, nil, &EndpointDesc{
|
||||
|
Reference in New Issue
Block a user