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
9cecdec977
Fix a bug where EndpointInfo would always be picked from the last
...
alternative setting.
When looking up matching EndpointInfo and InterfaceSetting for
an endpoint, a reference to range variable is stored. If range is
allowed to continue, the value of this variable will be updated.
It's a trick to allow use of "nil" pointer as a "found" variable, but it
requires a careful management of the range iterations.
2017-04-10 03:16:59 +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
aaef575b06
rename Setups to AltSettings
2017-04-09 20:45:35 +02:00
Sebastian Zagrodzki
a5c4de3a29
more comments. Rename USBError to just Error.
2017-04-09 19:41:44 +02:00
Sebastian Zagrodzki
f668df87df
OpenEndpoint for now takes an address - a device can have two endpoints
...
with the same number...
2017-04-09 19:08:42 +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
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
676cb78cae
unwrap the nested ifs
2017-02-26 21:43:56 +01:00
Sebastian Zagrodzki
cc135fe616
move all libusb wrappers to libusb.go.
2017-02-23 10:25:02 +01:00
Sebastian Zagrodzki
2efb1a354f
Use newEndpoint() for initialization. Add an indirection for
...
newUSBTransfer.
2017-02-19 15:35:35 +01:00
vincentserpoul
303eb08f98
comment nitpicking :)
2017-02-17 02:48:05 +08:00
vincentserpoul
a431f86bcb
comment grammar
2017-02-17 02:28:24 +08:00
vincentserpoul
0a1a8e43cd
error handling and bool handling
2017-02-17 02:00:24 +08:00
vincentserpoul
d8e3995f7c
improve comment
2017-02-17 02:00:24 +08:00
vincentserpoul
09dcccd0dd
add bool handling
2017-02-17 02:00:24 +08:00
vincentserpoul
6586e027a6
remove systematic detach, add SetAutoDetach method
2017-02-17 02:00:24 +08:00
vincentserpoul
7c2897852d
detach before claim
2017-02-17 02:00:24 +08: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
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
beb4fdbac5
Update copyright notes for multiple contributors.
2017-02-07 07:37:57 +01:00
nodtem66
3138826f8a
fix cgo build directive
2015-04-08 01:25:20 +07:00
nodtem66
f3b93aa5fa
handle error OpenDeviceWithVidPid and add GetStringDescriptor
2015-03-04 01:32:24 +07:00
Kyle Lemons
96f1a0a774
Update LICENSE
2013-08-14 19:22:55 -07:00
Kyle Lemons
f0081d8ff9
add xbox example and make some changes to support it
2013-06-22 08:38:58 -07:00
Ivan Krasin
b0713f61b4
Allow opening multiple endpoints for the same device, if configuration is also the same.
2013-06-16 20:29:54 -07:00
Kyle Lemons
67ecea5706
Update readme with instructions for darwin
2013-04-07 12:32:53 -07:00
Kyle Lemons
1723f5a08d
gofmt
2012-07-22 23:40:25 -07:00
Kyle Lemons
e5fd0ba6e3
Fix double free issues
2012-07-22 23:36:03 -07:00
Kyle Lemons
acb3aed8c3
Working on iso
2012-04-16 00:18:53 -04:00
Kyle Lemons
96ca30cdbb
Fix ordering of config
2012-04-15 22:43:55 -04: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
Kyle Lemons
0c8ed5357c
Add first round of bulk/interrupt I/O
2012-03-27 23:04:18 -07:00
Kyle Lemons
c8d19d2d0f
Renames
2012-03-27 20:30:16 -07:00
Kyle Lemons
e5a0531ed2
Cleanup
2012-03-27 19:40:22 -07:00
Kyle Lemons
2da2ce1e17
gofmt
2012-03-26 22:51:47 -07:00
Kyle Lemons
86ebf94158
Output cleanup
2012-03-26 22:51:37 -07:00
Kyle Lemons
0f572675c9
Tidy up interfaces and pretty printing
2012-03-26 22:37:25 -07:00
Kyle Lemons
ba2dd5404f
Add config, interfaces, endpoints, etc
2012-03-26 00:06:53 -07:00
Kyle Lemons
804a3c6ab8
First cut
2012-03-25 04:11:01 -07:00