driver

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("benjamin: no compatible device found")
)

Functions

func Open

func Open() (benjamin.Device, error)

Open the first available device.

func Register

func Register(detect func() bool, driver Driver)

Register a driver.

func RegisterUSB

func RegisterUSB(vendorID, productID uint16, driver USBDriver)

RegisterUSB registers a USB driver.

func Scan

func Scan() []benjamin.Device

Scan available devices.

Types

type Driver

type Driver func() benjamin.Device

Driver returns a device drivers for a device.

type USBDriver

type USBDriver func(hid.DeviceInfo) benjamin.Device

USBDriver returns a device driver for a USB device.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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