add xbox example and make some changes to support it
This commit is contained in:
22
usb/debug.go
Normal file
22
usb/debug.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package usb
|
||||
|
||||
// To enable internal debugging:
|
||||
// -ldflags "-X github.com/kylelemons/gousb/usb.debugInternal true"
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log" // TODO(kevlar): make a logger
|
||||
"os"
|
||||
)
|
||||
|
||||
var debug *log.Logger
|
||||
var debugInternal string
|
||||
|
||||
func init() {
|
||||
var out io.Writer = ioutil.Discard
|
||||
if debugInternal != "" {
|
||||
out = os.Stderr
|
||||
}
|
||||
debug = log.New(out, "usb", log.LstdFlags|log.Lshortfile)
|
||||
}
|
Reference in New Issue
Block a user