add xbox example and make some changes to support it

This commit is contained in:
Kyle Lemons
2013-06-22 08:38:58 -07:00
parent 98ceb07d97
commit f0081d8ff9
5 changed files with 356 additions and 11 deletions

View File

@@ -1,12 +1,16 @@
package usb
import (
"fmt"
)
// #include <libusb-1.0/libusb.h>
import "C"
type usbError C.int
func (e usbError) Error() string {
return "libusb: " + usbErrorString[e]
return fmt.Sprintf("libusb: %s [code %d]", usbErrorString[e], int(e))
}
const (