transport

package
v0.0.0-...-7d2f2d7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VendorOne  = 0x534c
	ProductOne = 0x0001
	VendorT    = 0x1209
	ProductT   = 0x53C1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus interface {
	Enumerate() ([]Device, error)
	Connect(device Device) (Transport, error)
}

type Device

type Device struct {
	Path      string
	VendorID  int
	ProductID int
}

type Transport

type Transport interface {
	Write([]byte)
	Read() ([]byte, uint16, int, error)
	Close()
}

type TransportHID

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

func (*TransportHID) Close

func (t *TransportHID) Close()

func (*TransportHID) Read

func (t *TransportHID) Read() ([]byte, uint16, int, error)

func (*TransportHID) SetDevice

func (t *TransportHID) SetDevice(device hid.Device)

func (*TransportHID) Write

func (t *TransportHID) Write(msg []byte)

type TransportHIDAndroid

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

func (*TransportHIDAndroid) Close

func (t *TransportHIDAndroid) Close()

func (*TransportHIDAndroid) Read

func (t *TransportHIDAndroid) Read() ([]byte, uint16, int, error)

func (*TransportHIDAndroid) SetDevice

func (t *TransportHIDAndroid) SetDevice(device hid.Device)

func (*TransportHIDAndroid) Write

func (t *TransportHIDAndroid) Write(msg []byte)

Jump to

Keyboard shortcuts

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