12 Commits

Author SHA1 Message Date
Kuba Raczkowski
606016adee Android support via fileDescriptor (#130)
Adds a new way to initialize the context, `ContextOptions`, and a new way to open devices, `OpenDeviceWithFileDescriptor`.

Combined they can be used to support Android devices, where device enumeration is not supported (can be now disabled through `ContextOptions`) and where USB devices can be opened in the Android SDK and passed over to gousb through a file descriptor.

Co-authored-by: Juan <994594+juaoose@users.noreply.github.com>
Co-authored-by: Kuba Raczkowski <kuba.raczkowski@spectricity.com>
2024-09-08 21:40:30 +02:00
Sebastian Zagrodzki
0eba1b1264 Checks for closed/uninitialized context and devices. (#93) 2021-01-15 17:25:29 +01:00
zagrodzki
c113a5e0de Parallelize tests (#17)
* Store a reference to libusb implementation in the context, transfers
and some more places. Remove the global libusb variable.

* Parallelize tests.

* Fix the link in README.
2017-09-04 16:55:47 +02:00
zagrodzki
f9aba6fab5 Config and interface description (#16)
* Add APIs for config and interface descriptors. Split out the common
parts of selecting a config descriptor from device desc and
selecting a setting descriptor from a config desc.

* Parallelize the few tests that actually can be parallelized safely.
Add comments where they can't. Note to self: it would be beneficial
to restructure the fakelibusb to index all properties of the lib
with the used context. That way a libusb implementation wouldn't need
to be referred via a shared variable.
2017-09-04 14:17:34 +02:00
Sebastian Zagrodzki
67ddfbabc2 Rename ListDevices to OpenDevices. Add more doc for RemoteWakeup. 2017-06-13 10:55:30 +02:00
Sebastian Zagrodzki
e40669b614 Move examples to external, so that gousb is explicitly referenced. 2017-06-13 10:42:18 +02:00
Sebastian Zagrodzki
d68d0c1a41 Rename more "Info" fields to "Desc" 2017-05-06 02:52:19 +02:00
Sebastian Zagrodzki
9f04f7bdf0 Replace anonymous DeviceDesc field import with a named "Desc" field. 2017-05-06 02:47:24 +02:00
Sebastian Zagrodzki
fedc9864dd rename Descriptor to DeviceDesc 2017-05-06 02:36:45 +02:00
Sebastian Zagrodzki
86c8e27edf moar comments. Add a done callback to DefaultInterface return values. 2017-05-06 02:30:16 +02:00
Sebastian Zagrodzki
89dc91ef06 Moar documentation and examples. 2017-05-06 02:16:53 +02:00
Sebastian Zagrodzki
5200a36191 Move files from gousb/usb to gousb 2017-05-06 00:11:11 +02:00