Documentation ¶
Index ¶
Constants ¶
View Source
const ( USBDEVFS_IOCTL = 0xc0105512 USBDEVFS_BULK = 0xc0185502 USBDEVFS_CONTROL = 0xc0185500 USBDEVFS_SUBMITURB = 0x8038550a USBDEVFS_REAPURB = 0x4008550c USBDEVFS_URB_TYPE_ISO = 0 USBDEVFS_URB_TYPE_INTERRUPT = 1 USBDEVFS_URB_TYPE_CONTROL = 2 USBDEVFS_URB_TYPE_BULK = 3 )
View Source
const ( USBDEVFS_CONNECT = 0x5517 USBDEVFS_DISCONNECT = 0x5516 USBDEVFS_CLAIM = 0x8004550f USBDEVFS_RELEASE = 0x80045510 )
View Source
const ( UsbDescTypeDevice = 1 UsbDescTypeConfig = 2 UsbDescTypeString = 3 UsbDescTypeInterface = 4 UsbDescTypeEndpoint = 5 UsbDescTypeReport = 33 )
View Source
const DevBusUsb = "/dev/bus/usb"
View Source
const UsbHidClass = 3
Variables ¶
Default Logger setting var Logger = log.New(log.Writer(), "hid", log.LstdFlags)
Functions ¶
Types ¶
type Handle ¶ added in v0.1.0
type Handle interface { Close() error HIDReport() ([]byte, error) SetFeatureReport(int, []byte) error GetFeatureReport(int) ([]byte, error) ReadInputPacket(timeout time.Duration) ([]byte, error) Read(buf []byte, ms time.Duration) (int, error) Write(data []byte, ms time.Duration) (int, error) Ctrl(rtype, req, val, index int, data []byte, t int) (int, error) }
Click to show internal directories.
Click to hide internal directories.