usbinfo

package module
v0.0.0-...-37dfefd Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: MIT Imports: 8 Imported by: 0

README

usbinfo

Simple USB library which helps to read information about the connected USB devices

Currently only Linux (386/amd64) is supported.

Based on zserge's USB HID driver

Documentation

Index

Constants

View Source
const (
	USBDEVFS_IOCTL   = 0xc0105512
	USBDEVFS_BULK    = 0xc0185502
	USBDEVFS_CONTROL = 0xc0185500
)
View Source
const (
	UsbDescTypeDevice    = 1
	UsbDescTypeConfig    = 2
	UsbDescTypeString    = 3
	UsbDescTypeInterface = 4
	UsbDescTypeEndpoint  = 5
	UsbDescTypeReport    = 33
)
View Source
const DevBusUsb = "/dev/bus/usb"
View Source
const UsbHidClass = 3

Variables

This section is empty.

Functions

func UsbWalk

func UsbWalk(cb func(Device))

Types

type Device

type Device interface {
	Info() Info
}

type Info

type Info struct {
	Vendor   uint16
	Product  uint16
	Revision uint16

	SubClass uint8
	Protocol uint8

	Interface uint8
}

General information about the USB device

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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