usb

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package usb provides USB util functions for health tast.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sort

func Sort(d []Device)

Sort sorts a slice of Devices.

Types

type Device

type Device struct {
	VendorID    string
	ProdID      string
	VendorName  string
	ProductName string
	Class       string
	SubClass    string
	Protocol    string
	Interfaces  []Interface
}

Device represents a USB device.

func ExpectedDevices

func ExpectedDevices(ctx context.Context) ([]Device, error)

ExpectedDevices returns expected USB devices, sorted by VendorID+ProdID.

type Interface

type Interface struct {
	InterfaceNumber uint8
	Class           string
	SubClass        string
	Protocol        string
	Driver          *string
}

Interface represents a USB interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL