This commit is contained in:
Kyle Lemons
2012-03-27 19:40:32 -07:00
parent e5a0531ed2
commit 5fef64fd78

View File

@@ -10,12 +10,12 @@ type Descriptor struct {
Address uint8 // The address of the device on the bus
// Version information
Spec BCD // USB Specification Release Number
Spec BCD // USB Specification Release Number
Device BCD // The device version
// Product information
Vendor ID // The Vendor identifer
Product ID // The Product identifier
Vendor ID // The Vendor identifer
Product ID // The Product identifier
// Protocol information
Class uint8 // The class of this device
@@ -44,15 +44,15 @@ func newDescriptor(dev *C.libusb_device) (*Descriptor, error) {
}
return &Descriptor{
Bus: uint8(C.libusb_get_bus_number(dev)),
Address: uint8(C.libusb_get_device_address(dev)),
Spec: BCD(desc.bcdUSB),
Device: BCD(desc.bcdDevice),
Vendor: ID(desc.idVendor),
Product: ID(desc.idProduct),
Class: uint8(desc.bDeviceClass),
SubClass: uint8(desc.bDeviceSubClass),
Protocol: uint8(desc.bDeviceProtocol),
Configs: cfgs,
Bus: uint8(C.libusb_get_bus_number(dev)),
Address: uint8(C.libusb_get_device_address(dev)),
Spec: BCD(desc.bcdUSB),
Device: BCD(desc.bcdDevice),
Vendor: ID(desc.idVendor),
Product: ID(desc.idProduct),
Class: uint8(desc.bDeviceClass),
SubClass: uint8(desc.bDeviceSubClass),
Protocol: uint8(desc.bDeviceProtocol),
Configs: cfgs,
}, nil
}