Documentation ¶
Overview ¶
Package usb provides utilities for searching for and working with usb based devices.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SysPaths = []string{"/sys/bus/usb-serial/devices", "/sys/bus/usb/drivers/cdc_acm"}
SysPaths are where we search for devices. This can be changed for tests.
Functions ¶
This section is empty.
Types ¶
type Description ¶
type Description struct { ID Identifier Path string }
Description describes a specific USB device.
func Search ¶
func Search(filter SearchFilter, includeDevice func(vendorID, productID int) bool) []Description
Search uses linux device APIs to find all applicable USB devices.
type Identifier ¶
Identifier identifies a specific USB device by the vendor who produced it and the product that it is. These should be unique across products.
Click to show internal directories.
Click to hide internal directories.