Use int for Bus/Addr, not uint8.

This commit is contained in:
Sebastian Zagrodzki
2017-04-29 02:12:04 +02:00
parent 541275d5b9
commit 60d0aba507
3 changed files with 7 additions and 7 deletions

View File

@@ -23,8 +23,8 @@ import (
// Descriptor is a representation of a USB device descriptor.
type Descriptor struct {
// Bus information
Bus uint8 // The bus on which the device was detected
Address uint8 // The address of the device on the bus
Bus int // The bus on which the device was detected
Address int // The address of the device on the bus
// Version information
Spec BCD // USB Specification Release Number

View File

@@ -277,8 +277,8 @@ func (libusbImpl) getDeviceDesc(d *libusbDevice) (*Descriptor, error) {
}
return &Descriptor{
Bus: uint8(C.libusb_get_bus_number((*C.libusb_device)(d))),
Address: uint8(C.libusb_get_device_address((*C.libusb_device)(d))),
Bus: int(C.libusb_get_bus_number((*C.libusb_device)(d))),
Address: int(C.libusb_get_device_address((*C.libusb_device)(d))),
Spec: BCD(desc.bcdUSB),
Device: BCD(desc.bcdDevice),
Vendor: ID(desc.idVendor),