Commit Graph

12 Commits

Author SHA1 Message Date
Sebastian Zagrodzki
d3428d9b35 Use Class for classes in usbid. 2017-04-09 18:29:16 +02:00
Sebastian Zagrodzki
3e59eeac6c replace class/subclass with Class type 2017-04-09 16:41:38 +02:00
Sebastian Zagrodzki
ca02c03241 since this is the only usecase, return a *libusbDevice for a new
pointer.
2017-04-09 00:12:39 +02:00
Sebastian Zagrodzki
3ec748db4c An invalid pointer triggers a runtime failure when passed as argument in
Go1.7:
runtime: bad pointer in frame
github.com/kylelemons/gousb/usb.(*fakeLibusb).open at 0xc420045ce0: 0x1
fatal error: invalid stack pointer

Use an arbitrary C-allocated pointer instead.
2017-04-09 00:10:15 +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
36241e869e more constants 2017-03-27 22:29:24 +02:00
Sebastian Zagrodzki
4b17678362 remove a call to libusb_open_device_with_vid_pid, as it's just a
convenience wrapper. Reimplement the same trivial wrapper in Go.
2017-03-10 07:22:04 -05:00
Sebastian Zagrodzki
bed02e9838 A benchmark on the trivial cgo call, to assess overhead of different
ways of calling out to cgo.
2017-03-01 10:51:17 +01:00
Sebastian Zagrodzki
00dbfd23dd done channel is now initialized on submit.
add a data() method, to avoid reaching into any xfer fields.
2017-02-26 21:02:29 +01:00
Sebastian Zagrodzki
bf3b23ccd2 move all transfer C parts to libusb.go to alloc() 2017-02-23 10:45:35 +01:00
Sebastian Zagrodzki
21d53c9180 usb.go no longer needs "C" 2017-02-23 10:39:50 +01:00
Sebastian Zagrodzki
74b932b022 Duh, missing libusb.go... 2017-02-23 10:38:25 +01:00