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