Support libusb_set_option in additon to libusb_set_debug. (#39)

* 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.
This commit is contained in:
Sebastian Zagrodzki
2018-05-23 16:07:03 +02:00
committed by GitHub
parent 21b0ed46ae
commit c6e780971f
3 changed files with 30 additions and 1 deletions

2
usb.go
View File

@@ -134,6 +134,8 @@ type Context struct {
// Debug changes the debug level. Level 0 means no debug, higher levels
// will print out more debugging information.
// TODO(sebek): in the next major release, replace int levels with
// Go-typed constants.
func (c *Context) Debug(level int) {
c.libusb.setDebug(c.ctx, level)
}