a50ac957b1Updated dead link (#59)
Jo Haugum
2018-11-06 09:00:28 -08:00
0f73bf7aeaReplace libusb class ID definitions with a manually curated list based directly off usb.org list. (#58)
Sebastian Zagrodzki
2018-11-05 17:35:27 +01:00
da849d96b5Add context-aware read/write (#57)
Sebastian Zagrodzki
2018-11-05 15:33:31 +01:00
1aaa100bdbAllocate libusb buffers in C (#11)
zagrodzki
2017-08-29 12:11:04 +02:00
bc91dd3f2cExtend the autodetach behavior
Nico MT
2017-07-21 21:15:49 +02:00
9829f2fcbaFixed libusb: warning [libusb_exit] some libusb_devices were leaked (#7)
Veniamin Albaev
2017-07-20 15:09:58 +03:00
9fc0278283Don't reset the configuration if desired config is already active (#6)
Filzmaier Josef
2017-06-29 14:31:12 +02:00
aa64bae804Appveyor support (#2)
Tamási Benjamin
2017-06-20 16:03:55 +02:00
00e8f24bdaMerge pull request #1 from google/same-endpoint-in-out
zagrodzki
2017-06-14 11:15:38 +02:00
2b78100ce3Allow the same endpoint number to be reused for IN and OUT endpoints separately, effectively allowing two endpoints with the same number - numbers are no unique, only endpoint addresses are.
Sebastian Zagrodzki
2017-06-13 23:04:34 +02:00
883910dd57Call the API stable.
Sebastian Zagrodzki
2017-06-13 10:58:50 +02:00
f87a74e39fUpdate uses of List/OpenDevices
Sebastian Zagrodzki
2017-06-13 10:56:35 +02:00
67ddfbabc2Rename ListDevices to OpenDevices. Add more doc for RemoteWakeup.
Sebastian Zagrodzki
2017-06-13 10:55:30 +02:00
e1fd376a2emore comment updates, rename "intf" parameter of Interface to "num"
Sebastian Zagrodzki
2017-06-13 10:48:28 +02:00
e40669b614Move examples to external, so that gousb is explicitly referenced.
Sebastian Zagrodzki
2017-06-13 10:42:18 +02:00
b709988501Fix typos, more precise example for configurations.
Sebastian Zagrodzki
2017-06-13 10:40:01 +02:00
688cb291ddRemove unused references to iso_packet_desc field in libusb_transfer.
Sebastian Zagrodzki
2017-05-07 17:54:55 +02:00
a367f386ffpopulate MaxControlPacketSize
Sebastian Zagrodzki
2017-05-07 13:42:09 +02:00
ead4e1f406That didn't pan out - libusb does not have functions that would allow returning raw config descriptor without opening the device.
Sebastian Zagrodzki
2017-05-07 13:38:40 +02:00
5f9276965fStart decoding descriptor in Go, rather than relying on libusb helper functions. Descriptor format is defined explicitly by the USB spec.
Sebastian Zagrodzki
2017-05-06 23:42:52 +02:00
b0df83bff6Add PollInterval specifications.
Sebastian Zagrodzki
2017-05-06 13:16:48 +02:00
bcc0b02135move sections around
Sebastian Zagrodzki
2017-05-06 02:58:50 +02:00
865b14439bWriteStream not used yet.
Sebastian Zagrodzki
2017-05-06 02:56:37 +02:00
e117225966lint fixes
Sebastian Zagrodzki
2017-05-06 02:54:22 +02:00
d68d0c1a41Rename more "Info" fields to "Desc"
Sebastian Zagrodzki
2017-05-06 02:52:19 +02:00
9f04f7bdf0Replace anonymous DeviceDesc field import with a named "Desc" field.
Sebastian Zagrodzki
2017-05-06 02:47:24 +02:00
4991f9c89buse ConfigDesc, InterfaceDesc and EndpointDesc.
Sebastian Zagrodzki
2017-05-06 02:43:16 +02:00
e5961a7cc4rename ConfigInfo to ConfigDesc
Sebastian Zagrodzki
2017-05-06 02:40:09 +02:00
fedc9864ddrename Descriptor to DeviceDesc
Sebastian Zagrodzki
2017-05-06 02:36:45 +02:00
86c8e27edfmoar comments. Add a done callback to DefaultInterface return values.
Sebastian Zagrodzki
2017-05-06 02:30:16 +02:00
c6b9a04e9fDocument Interface parameters.
Sebastian Zagrodzki
2017-05-06 02:19:57 +02:00
89dc91ef06Moar documentation and examples.
Sebastian Zagrodzki
2017-05-06 02:16:53 +02:00
eb5500f387Move Control from Config to Device. Rename Default to DefaultInterface.
Sebastian Zagrodzki
2017-05-06 02:16:22 +02:00
1c9a11b1ceRemove "libusb" from the comments.
Sebastian Zagrodzki
2017-05-06 00:31:04 +02:00
9623c1ba8dreplace ActiveConfig with ActiveConfigNum. Add a Default() helper that simplifies setup for uncomplicated USB devices.
Sebastian Zagrodzki
2017-05-06 00:20:43 +02:00
5200a36191Move files from gousb/usb to gousb
Sebastian Zagrodzki
2017-05-06 00:11:11 +02:00
acb9ee3242Add notes about this being ver 2.0 of kylelemons/gousb
Sebastian Zagrodzki
2017-05-05 23:44:51 +02:00
e33e0fef82s/kylelemons/google/ in the new repo.
Sebastian Zagrodzki
2017-05-05 23:41:11 +02:00
730c32b9fdAdd tests for endpoint NewStream. Rename OpenWithVidPid to OpenWithVIDPID.
Sebastian Zagrodzki
2017-04-29 12:57:55 +02:00
58c1e6ddb4add tests for active config and reset
Sebastian Zagrodzki
2017-04-29 12:23:45 +02:00
2794d88744config is %d, not %s
Sebastian Zagrodzki
2017-04-29 12:21:17 +02:00
6d81ca37d3Use a map to store endpoint descriptors. Allows easy access to a particular endpoint number.
Sebastian Zagrodzki
2017-04-29 12:19:34 +02:00
77c176cd4cReplace descriptor Configs with a map - config ids are arbitrary numbers (unlike interface or alt setting numbers, which are 0-based array indices). This makes it easier to access a particular config without having to iterate over the descriptors.
Sebastian Zagrodzki
2017-04-29 11:56:49 +02:00
60d0aba507Use int for Bus/Addr, not uint8.
Sebastian Zagrodzki
2017-04-29 02:12:04 +02:00
541275d5b9update error message to be more verbose
Sebastian Zagrodzki
2017-04-29 01:37:39 +02:00
b39b8d9521Add "empty" to confirm no transfers are in flight in fakeusb. Update endpoint_test - if buffer length is 0, no transfer is submitted.
Sebastian Zagrodzki
2017-04-29 01:35:09 +02:00
c2d1a4c03dFormat bus/addr with a dot.
Sebastian Zagrodzki
2017-04-29 01:00:19 +02:00
ef59587a24move descriptor to the device, like config and interface. Clear separation between descriptor stringers and value stringers for the device and interface.
Sebastian Zagrodzki
2017-04-29 00:59:13 +02:00
59b493ec3cSeparate descriptor Stringer from value Stringer.
Sebastian Zagrodzki
2017-04-29 00:53:42 +02:00
a69a315dbdVerify that interface and alternate numbers are 0-based indices, we rely on this assumption in the config.
Sebastian Zagrodzki
2017-04-29 00:50:38 +02:00
80f3c60b2bBetter error messages. Update rawread to use the new endpoint interface.
Sebastian Zagrodzki
2017-04-29 00:41:26 +02:00
1fd4e7f4c4Check if the device is already closed and if the interface is already claimed.
Sebastian Zagrodzki
2017-04-29 00:27:51 +02:00
0cfaee3514Fail operations if Close was called before.
Sebastian Zagrodzki
2017-04-29 00:18:26 +02:00
5f122b4dcdIntroduce 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.
Sebastian Zagrodzki
2017-04-29 00:01:11 +02:00
d193e605a4fix extra Logf arguments
Sebastian Zagrodzki
2017-04-28 23:58:56 +02:00
5c63741f14more readable debug log prefix
Sebastian Zagrodzki
2017-04-28 23:58:16 +02:00
26b662893dUse a new behavior of newFakeLibusb. Add a benchmark for subslicing.
Sebastian Zagrodzki
2017-04-27 03:26:08 +02:00
d85a738414a new fakelibusb will overwrite libusb and restore it automatically on done()
Sebastian Zagrodzki
2017-04-27 03:25:36 +02:00