Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Vendors stores the vendor and product ID mappings. Vendors map[ID]*Vendor // Classes stores the class, subclass and protocol mappings. Classes map[ClassCode]*Class )
Functions ¶
func ParseIDs ¶
ParseIDs parses and returns mappings from the given reader. In general, this should not be necessary, as a set of mappings is already embedded in the library. If a new or specialized file is obtained, this can be used to retrieve the mappings, which can be stored in the global Vendors and Classes map.
Types ¶
type ClassCode ¶
type ClassCode uint8
ClassCode represents a USB-IF (Implementers Forum) class or subclass code.
const ( ClassPerInterface ClassCode = 0x00 ClassAudio ClassCode = 0x01 ClassComm ClassCode = 0x02 ClassHID ClassCode = 0x03 ClassPhysical ClassCode = 0x05 ClassImage ClassCode = 0x06 ClassPTP ClassCode = ClassImage // legacy name for image ClassPrinter ClassCode = 0x07 ClassMassStorage ClassCode = 0x08 ClassHub ClassCode = 0x09 ClassData ClassCode = 0x0a ClassSmartCard ClassCode = 0x0b ClassContentSecurity ClassCode = 0x0d ClassVideo ClassCode = 0x0e ClassPersonalHealthcare ClassCode = 0x0f ClassAudioVideo ClassCode = 0x10 ClassBillboard ClassCode = 0x11 ClassUSBTypeCBridge ClassCode = 0x12 ClassDiagnosticDevice ClassCode = 0xdc ClassWireless ClassCode = 0xe0 ClassMiscellaneous ClassCode = 0xef ClassApplication ClassCode = 0xfe ClassVendorSpec ClassCode = 0xff )
Standard classes defined by USB spec, see https://www.usb.org/defined-class-codes
type Product ¶
A Product contains the name of the product (from a particular vendor) and the names of any interfaces that were specified.
type Protocol ¶
type Protocol uint8
Protocol is the interface class protocol, qualified by the values of interface class and subclass.