Documentation ¶
Overview ¶
Package usb implements an USB device registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register registers a driver for an USB device.
When this device is found, the factory will be called with a device handle.
func RegisterBus ¶
func RegisterBus(c chan<- Driver)
RegisterBus is called by a bus that will send a notification everytime there's a new driver being registered.
Types ¶
type ConnCloser ¶
ConnCloser is an USB device handle that can be closed.
This interface is meant to be handled by the USB device driver, not the application.
type Driver ¶
type Driver struct { ID // TODO(maruel): Using only the ID as the selector is a bit naive. There's known conflicts. Opener }
Driver is a registered driver.
type Opener ¶
type Opener func(dev ConnCloser) error
Opener takes control of an already opened USB device.
Click to show internal directories.
Click to hide internal directories.