Commit Graph

27 Commits

Author SHA1 Message Date
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