Versions in this module Expand all Collapse all v0 v0.0.30 May 1, 2024 Changes in this version + var ErrDeviceClosed = errors.New("usb: device closed") + var ErrUnsupportedPlatform = errors.New("usb: unsupported platform") + func Supported() bool + type Device interface + Close func() error + Read func(b []byte) (int, error) + Write func(b []byte) (int, error) + type DeviceInfo struct + Interface int + Manufacturer string + Path string + Product string + ProductID uint16 + Release uint16 + Serial string + Usage uint16 + UsagePage uint16 + VendorID uint16 + func Enumerate(vendorID uint16, productID uint16) ([]DeviceInfo, error) + func EnumerateHid(vendorID uint16, productID uint16) ([]DeviceInfo, error) + func EnumerateRaw(vendorID uint16, productID uint16) ([]DeviceInfo, error) + func (info DeviceInfo) Open() (Device, error) + type HidDevice struct — js/wasm + func (dev *HidDevice) Close() error + func (dev *HidDevice) Read(b []byte) (int, error) + func (dev *HidDevice) Write(b []byte) (int, error) + type RawDevice struct — js/wasm + func (dev *RawDevice) Close() error + func (dev *RawDevice) Read(b []byte) (int, error) + func (dev *RawDevice) Write(b []byte) (int, error)