Sebastian Zagrodzki
168b501d53
Rename IfClass/IfSubClass/IfProtocol to Class/SubClass/Protocol, these
...
fields occur within an interface descriptor.
2017-04-09 18:44:32 +02:00
Sebastian Zagrodzki
f91d53931a
Use Protocol type for USB interface protocol.
2017-04-09 18:42:04 +02:00
Sebastian Zagrodzki
d3428d9b35
Use Class for classes in usbid.
2017-04-09 18:29:16 +02:00
Sebastian Zagrodzki
af00028b97
more comments, add Milliamperes type.
2017-04-09 18:15:48 +02:00
Sebastian Zagrodzki
e6f6a4f76e
Use golint
2017-04-09 18:05:46 +02:00
Sebastian Zagrodzki
c437b39ef7
comments for endpointinfo type fields
2017-04-09 16:56:36 +02:00
Sebastian Zagrodzki
3e59eeac6c
replace class/subclass with Class type
2017-04-09 16:41:38 +02:00
Sebastian Zagrodzki
6d9ea8e966
testDBPath is a const, not var...
2017-04-09 01:05:09 +02:00
Sebastian Zagrodzki
f2c4300ad5
testDBPath to package variables
2017-04-09 01:04:43 +02:00
Sebastian Zagrodzki
0566e701f6
add tests for URL fetching
2017-04-09 00:58:47 +02:00
Sebastian Zagrodzki
aa9661f705
move static data to testdata files
2017-04-09 00:38:42 +02:00
Sebastian Zagrodzki
fc9b74ed82
error.go is a C mapping file, like libusb.go
2017-04-09 00:24:32 +02:00
Sebastian Zagrodzki
83302ae558
add test for an interrupt endpoint.
2017-04-09 00:22: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
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
648d3af9d8
use gousb2.0-dev for badges
2017-04-08 23:53:37 +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
d982ef5a37
Add constants for device speed.
2017-03-27 23:01:02 +02:00
Sebastian Zagrodzki
f3b2f37e3a
Rename the rest of the constants.
2017-03-27 22:33:29 +02:00
Sebastian Zagrodzki
36241e869e
more constants
2017-03-27 22:29:24 +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
3b8abbe38b
Point to gousb2.0 for that branch.
2017-03-26 18:48:36 +02:00
zagrodzki
7631ae4158
Merge pull request #42 from nkovacs/ignore-binaries
...
Ignore rawread and usbid/regen binaries
2017-03-26 18:46:22 +02:00
Nikola Kovacs
f19e934f9f
Ignore rawread and usbid/regen binaries
2017-03-26 18:40:51 +02:00
Sebastian Zagrodzki
926e8d0ea6
point to master branch for coverage, duh...
2017-03-26 18:37:57 +02:00
zagrodzki
0d18ae2f82
Merge pull request #45 from kylelemons/coveralls
...
Remove coveralls token entirely, it's not required for public repositories apparently...
2017-03-26 18:34:31 +02:00
Sebastian Zagrodzki
57244bb162
Remove coveralls token entirely, is supposed to "just work" for public
...
repositories.
2017-03-26 18:28:51 +02:00
Sebastian Zagrodzki
927ef57ca7
Gah. Of course it doesn't work, since the exit status from test is 1.
...
Replace "&&" with an "if".
2017-03-26 18:16:12 +02:00
zagrodzki
e1279ed840
Merge pull request #44 from kylelemons/coverage
...
If the coveralls token is not set, don't try to push the coverage report.
2017-03-26 18:08:41 +02:00
Sebastian Zagrodzki
90a47eb448
If the coveralls token is not set, don't try to push the coverage report.
2017-03-26 17:58:30 +02:00
zagrodzki
03533e78ed
Merge pull request #43 from kylelemons/libusb_wrappers_tests
...
Update an inaccurate comment
2017-03-26 17:56:24 +02:00
Sebastian Zagrodzki
0a7fc9fb53
Merge branch 'master' of https://github.com/kylelemons/gousb into libusb_wrappers_tests
2017-03-26 17:46:12 +02:00
Sebastian Zagrodzki
1f977a94aa
Update the comment - there's no way to create a new pointer to struct
...
libusb_device, since the struct is not defined in libusb headers (only
name is declared), as such the compiler doesn't know the size of the
struct to allocate.
2017-03-26 17:44:25 +02:00
zagrodzki
2bc8acd1c7
Merge pull request #41 from kylelemons/libusb_wrappers_tests
...
More tests
2017-03-23 18:15:31 +01:00
Sebastian Zagrodzki
4c5589cffb
Moar comments.
2017-03-23 18:07:55 +01:00
Sebastian Zagrodzki
1008e7c3c0
Merge branch 'master' into libusb_wrappers_tests
2017-03-22 19:16:29 +01:00
zagrodzki
79b30d4535
Merge pull request #40 from kylelemons/coverage
...
Add test coverage reporting based on Coveralls
2017-03-22 19:13:57 +01:00
Sebastian Zagrodzki
fc41761879
Remove the alloc test that used real libusb allocation.
2017-03-10 09:25:57 -05:00
Sebastian Zagrodzki
e0cfdc52dd
updated USB IDs
2017-03-10 09:09:34 -05:00
Sebastian Zagrodzki
ea2a438ec0
ignore libusb.go, as explicitly not covered due to poor C code
...
testability.
2017-03-10 09:00:37 -05:00
Sebastian Zagrodzki
81f2998055
Merge branch 'coverage' into libusb_wrappers_tests
2017-03-10 08:55:45 -05:00
Sebastian Zagrodzki
389ae4e2b3
EndpointInfo tests
2017-03-10 08:48:21 -05:00
Sebastian Zagrodzki
a221bef905
ensure the vid/pid match
2017-03-10 08:36:00 -05:00
Sebastian Zagrodzki
ff7995c159
Add endpoint open test
2017-03-10 08:35:50 -05:00
Sebastian Zagrodzki
991e1b6cc6
completed interface, no more references to real usb from fake.
2017-03-10 08:33:14 -05:00
Sebastian Zagrodzki
4add66ae0e
move things around, to keep list of the devices at the beginning.
2017-03-10 07:39:51 -05:00
Sebastian Zagrodzki
d392ad305d
Tests for OpenVidPid
2017-03-10 07:38:54 -05: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