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>
* Support libusb_set_option in additon to libusb_set_debug.
The latter is deprecated in libusb 1.0.22 and later.
* Move the "debug level constants" todo to the right place. Add a comment
about libusb 1.0.22 exported API version.
* 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.