s/DeviceSpeed/Speed/
This commit is contained in:
@@ -224,28 +224,28 @@ func (rt RequestType) String() string {
|
|||||||
return requestTypeDescription[rt]
|
return requestTypeDescription[rt]
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeviceSpeed identifies the speed of the device.
|
// Speed identifies the speed of the device.
|
||||||
type DeviceSpeed int
|
type Speed int
|
||||||
|
|
||||||
// Device speeds as defined in the USB spec.
|
// Device speeds as defined in the USB spec.
|
||||||
const (
|
const (
|
||||||
DeviceSpeedUnknown DeviceSpeed = C.LIBUSB_SPEED_UNKNOWN
|
SpeedUnknown Speed = C.LIBUSB_SPEED_UNKNOWN
|
||||||
DeviceSpeedLow DeviceSpeed = C.LIBUSB_SPEED_LOW
|
SpeedLow Speed = C.LIBUSB_SPEED_LOW
|
||||||
DeviceSpeedFull DeviceSpeed = C.LIBUSB_SPEED_FULL
|
SpeedFull Speed = C.LIBUSB_SPEED_FULL
|
||||||
DeviceSpeedHigh DeviceSpeed = C.LIBUSB_SPEED_HIGH
|
SpeedHigh Speed = C.LIBUSB_SPEED_HIGH
|
||||||
DeviceSpeedSuper DeviceSpeed = C.LIBUSB_SPEED_SUPER
|
SpeedSuper Speed = C.LIBUSB_SPEED_SUPER
|
||||||
)
|
)
|
||||||
|
|
||||||
var deviceSpeedDescription = map[DeviceSpeed]string{
|
var deviceSpeedDescription = map[Speed]string{
|
||||||
DeviceSpeedUnknown: "unknown",
|
SpeedUnknown: "unknown",
|
||||||
DeviceSpeedLow: "low",
|
SpeedLow: "low",
|
||||||
DeviceSpeedFull: "full",
|
SpeedFull: "full",
|
||||||
DeviceSpeedHigh: "high",
|
SpeedHigh: "high",
|
||||||
DeviceSpeedSuper: "super",
|
SpeedSuper: "super",
|
||||||
}
|
}
|
||||||
|
|
||||||
// String returns a human-readable name of the device speed.
|
// String returns a human-readable name of the device speed.
|
||||||
func (s DeviceSpeed) String() string {
|
func (s Speed) String() string {
|
||||||
return deviceSpeedDescription[s]
|
return deviceSpeedDescription[s]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user