Sebastian Zagrodzki
5f122b4dcd
Introduce two more layers between device and endpoint:
...
device -> active config -> claimed interface -> endpoints.
Device can have at most one active config. A config can have
multiple claimed interfaces, each with a specific alt setting.
An interface with an alt setting defines a list of endpoints.
2017-04-29 00:01:11 +02:00
Sebastian Zagrodzki
6c9e76f578
s/USB involving/USB transfers involving/
2017-04-26 22:27:46 +02:00
Sebastian Zagrodzki
93355e7490
replace uint32 in MaxPacketSize with int
2017-04-26 22:27:12 +02:00
Sebastian Zagrodzki
83276566fc
Replace uint8 with Go-idiomatic int, where it makes sense.
2017-04-26 22:22:07 +02:00
Sebastian Zagrodzki
b50bc8761f
First version of streaming transfers.
2017-04-23 10:45:04 +02:00
Sebastian Zagrodzki
b1dcaa1195
Add Device.OutEndpoint, simplify endpoint test.
2017-04-10 01:11:38 +02:00
Sebastian Zagrodzki
57b10f0dd3
Remove OpenEndpoint, add InEndpoint for Read transfers.
2017-04-10 01:00:53 +02:00
Sebastian Zagrodzki
128c206986
Move EndpointInfo to endpoint.go
2017-04-09 20:51:47 +02:00
Sebastian Zagrodzki
aaef575b06
rename Setups to AltSettings
2017-04-09 20:45:35 +02:00
Sebastian Zagrodzki
54aed557d8
more comments
2017-04-09 19:18:11 +02:00
Sebastian Zagrodzki
ab6b612d1b
String of the endpoint should use EndpointInfo, not the default mapping
...
from InterfaceInfo.
2017-04-09 00:18:54 +02:00
Sebastian Zagrodzki
e0f30623b3
Modify EndpointInfo to provide meaningful data rather than raw USB
...
descriptor values. E.g. for the user, the distinction between
MaxIsoPkt and MaxPktSize is irrelevant, only the calculated max packet
size matters.
2017-04-08 23:49:10 +02:00
Sebastian Zagrodzki
b70848cf73
start renaming the constants to Go-style.
2017-03-27 22:23:47 +02:00
Sebastian Zagrodzki
341fde410e
replace Endpoint interface with a real Endpoint struct.
2017-03-27 22:15:45 +02:00
Sebastian Zagrodzki
2d51a51ec5
newEndpoint no longer references *Device, but receives individual values
...
extracted from the device. Makes testing easier.
2017-02-26 21:47:47 +01:00
Sebastian Zagrodzki
d0859b8c47
Pass all required info to newEndpoint.
2017-02-26 21:44:15 +01:00
Sebastian Zagrodzki
6caeb9d701
remove transferIntf, instead rely on transfer.go "usbTransfer", but with
...
a fake libusb xfer underneath.
2017-02-26 21:12:18 +01:00
Sebastian Zagrodzki
cc135fe616
move all libusb wrappers to libusb.go.
2017-02-23 10:25:02 +01:00
Sebastian Zagrodzki
577447ecbf
s/newRealUSBTransfer/newLibUSBTransfer/
2017-02-22 23:52:28 +01:00
Sebastian Zagrodzki
313ba15ee6
unexport read/write timeout.
2017-02-22 23:51:36 +01:00
Sebastian Zagrodzki
34c00f398b
- more tests, for "out" endpoint.
2017-02-22 01:35:13 +01:00
Sebastian Zagrodzki
c7c647e701
First tests.
2017-02-19 16:04:16 +01:00
Sebastian Zagrodzki
2efb1a354f
Use newEndpoint() for initialization. Add an indirection for
...
newUSBTransfer.
2017-02-19 15:35:35 +01:00
Sebastian Zagrodzki
fce1a48eba
Endpoint no longer needs cgo.
2017-02-16 12:05:48 +01:00
Sebastian Zagrodzki
99ec211c43
Improve tests - use offsetof to find the position of the iso packet
...
descriptor in the transfer struct.
2017-02-16 12:04:10 +01:00
Sebastian Zagrodzki
0ba09a9942
Move device handle to newUSBTransfer args, remove separate attach()
2017-02-14 01:24:20 +01:00
Sebastian Zagrodzki
16f99ed0b0
Merge remote-tracking branch 'origin/master' into async_transfers_everywhere
2017-02-14 01:12:35 +01:00
Sebastian Zagrodzki
d4d7011a44
Don't assume libusb headers are always in libusb-1.0.
...
Use pkg-config to add correct include paths for libusb regardless of the
platform.
2017-02-13 17:08:46 +01:00
Sebastian Zagrodzki
e9d2ce49f0
Add missing attach.
2017-02-13 03:17:29 +01:00
Sebastian Zagrodzki
ea1db2d56a
move to updated transfer init protocol
2017-02-13 03:02:32 +01:00
Sebastian Zagrodzki
83a4778988
wait() does not need the buffer passed explicitly, it's already stored
...
in t.buf.
2017-02-10 22:32:16 +01:00
Sebastian Zagrodzki
87abb704d7
Make all transfer types use a generic endpoint.transfer() function
...
that uses libusb's asynchronous interface.
2017-02-10 22:06:57 +01:00
Sebastian Zagrodzki
c9c2757fe6
Replace the libusb_bulk_transfer with the same prepare-submit-wait
...
routine iso transfers use.
2017-02-10 21:46:12 +01:00
Sebastian Zagrodzki
c792f8e028
replace allocTransfer with a new more generic newUSBTransfer
2017-02-09 22:51:28 +01:00
Sebastian Zagrodzki
beb4fdbac5
Update copyright notes for multiple contributors.
2017-02-07 07:37:57 +01:00
Kyle Lemons
96f1a0a774
Update LICENSE
2013-08-14 19:22:55 -07:00
Kyle Lemons
1e5170b125
Working on iso
2012-04-15 18:58:18 -07:00
Kyle Lemons
9849a972c6
Added isochronous transfer
2012-04-12 20:15:30 -07:00
Kyle Lemons
71bbb57904
Checkpoint
2012-04-09 17:37:25 -07:00