hidraw

package
v0.0.0-...-bfada3a Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Monitor

func Monitor(match DeviceConfig) (chan MonitorEvent, error)

Only action=add events for the given match are passed through. All action=remove events are passed through, as they cannot be filtered.

Types

type DevInfo

type DevInfo struct {
	BusType uint
	Vendor  int
	Product int
}

type Device

type Device struct {
	// contains filtered or unexported fields
}

func Find

func Find(config DeviceConfig) (*Device, error)

func Open

func Open(info DeviceInfo) (*Device, error)

func (*Device) Close

func (self *Device) Close()

func (*Device) DevInfo

func (self *Device) DevInfo() (devInfo DevInfo, err error)

USB HID Device Info

Bus-level data about the device

func (*Device) Read

func (self *Device) Read(buf []byte) (int, error)

func (*Device) ReportDescriptor

func (self *Device) ReportDescriptor() ([]byte, error)

USB HID Report Descriptor

This is a magic thing that specifies the format of the reports http://stackoverflow.com/questions/21606991/custom-hid-device-hid-report-descriptor

func (*Device) String

func (self *Device) String() string

type DeviceConfig

type DeviceConfig struct {
	VendorID  uint
	ProductID uint
}

type DeviceInfo

type DeviceInfo struct {
	libudev.Device
	DeviceConfig
}

func List

func List(match DeviceConfig) (devices []DeviceInfo, err error)

type MonitorEvent

type MonitorEvent struct {
	DeviceInfo

	Action string
}

Jump to

Keyboard shortcuts

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