usb

package
v2.0.20+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("device not found")
)

Functions

This section is empty.

Types

type HID

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

func (*HID) Close

func (d *HID) Close() error

func (*HID) Read

func (d *HID) Read(buf []byte) (int, error)

func (*HID) Write

func (d *HID) Write(buf []byte) (int, error)

type HIDAPI

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

func InitHIDAPI

func InitHIDAPI(mw *memorywriter.MemoryWriter) (*HIDAPI, error)

func (*HIDAPI) Connect

func (b *HIDAPI) Connect(path string) (core.USBDevice, error)

func (*HIDAPI) Enumerate

func (b *HIDAPI) Enumerate() ([]core.USBInfo, error)

func (*HIDAPI) Has

func (b *HIDAPI) Has(path string) bool

type UDP

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

func InitUDP

func InitUDP(ports []int) (*UDP, error)

func (*UDP) Connect

func (u *UDP) Connect(path string) (core.USBDevice, error)

func (*UDP) Enumerate

func (u *UDP) Enumerate() ([]core.USBInfo, error)

func (*UDP) Has

func (u *UDP) Has(path string) bool

type UDPDevice

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

func (*UDPDevice) Close

func (d *UDPDevice) Close() error

func (*UDPDevice) Read

func (d *UDPDevice) Read(buf []byte) (int, error)

func (*UDPDevice) Write

func (d *UDPDevice) Write(buf []byte) (int, error)

type USB

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

func Init

func Init(buses ...core.USBBus) *USB

func (*USB) Connect

func (b *USB) Connect(path string) (core.USBDevice, error)

func (*USB) Enumerate

func (b *USB) Enumerate() ([]core.USBInfo, error)

func (*USB) Has

func (b *USB) Has(path string) bool

type WUD

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

func (*WUD) Close

func (d *WUD) Close() error

func (*WUD) Read

func (d *WUD) Read(buf []byte) (int, error)

func (*WUD) Write

func (d *WUD) Write(buf []byte) (int, error)

type WebUSB

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

func InitWebUSB

func InitWebUSB(mw *memorywriter.MemoryWriter) (*WebUSB, error)

func (*WebUSB) Close

func (b *WebUSB) Close()

func (*WebUSB) Connect

func (b *WebUSB) Connect(path string) (core.USBDevice, error)

func (*WebUSB) Enumerate

func (b *WebUSB) Enumerate() ([]core.USBInfo, error)

func (*WebUSB) Has

func (b *WebUSB) Has(path string) bool

Directories

Path Synopsis
Package libusb provides go wrappers for libusb-1.0
Package libusb provides go wrappers for libusb-1.0

Jump to

Keyboard shortcuts

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