Use Protocol type for USB interface protocol.

This commit is contained in:
Sebastian Zagrodzki
2017-04-09 18:42:04 +02:00
parent d3428d9b35
commit f91d53931a
7 changed files with 20 additions and 11 deletions

View File

@@ -19,6 +19,7 @@ package usb
import "C"
import "strconv"
// Class represents a USB-IF class or subclass code.
type Class uint8
const (
@@ -58,6 +59,14 @@ func (c Class) String() string {
return strconv.Itoa(int(c))
}
// Protocol is the interface class protocol, qualified by the values
// of interface class and subclass.
type Protocol uint8
func (p Protocol) String() string {
return strconv.Itoa(int(p))
}
type DescriptorType uint8
const (