Documentation ¶
Index ¶
Constants ¶
View Source
const ( USBDEVFS_IOCTL = 0xc0105512 USBDEVFS_BULK = 0xc0185502 USBDEVFS_CONTROL = 0xc0185500 )
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
Functions ¶
Types ¶
type Device ¶
type Device interface { Open() error Close() Info() Info HIDReport() ([]byte, error) SetReport(int, []byte) error GetReport(int) ([]byte, error) Read(size int, ms time.Duration) ([]byte, error) Write(data []byte, ms time.Duration) (int, error) Ctrl(rtype, req, val, index int, data []byte, t int) (int, error) }
A common HID device interace
Click to show internal directories.
Click to hide internal directories.