Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nobonobo/hid
HID wrapper library for Wasm and Native Cross support.
https://github.com/nobonobo/hid
Last synced: 22 days ago
JSON representation
HID wrapper library for Wasm and Native Cross support.
- Host: GitHub
- URL: https://github.com/nobonobo/hid
- Owner: nobonobo
- Created: 2021-12-27T12:02:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-31T03:33:54.000Z (almost 3 years ago)
- Last Synced: 2024-06-20T03:42:24.180Z (6 months ago)
- Language: Go
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hid
Cross PLatform HID API
- Native(Linux, Windows, MacOS)
- Wasm(js)## Global Types
- HIDDeviceFilter struct
- VendorId
- ProductId## Global functions
- GetDevices() ([]\*HIDDevice, error)
- RequestDevice(options ...HIDDeviceFilter) ([]\*HIDDevice, error)## type HIDDevice struct
Getters:
- Opened() bool
- VendorID() uint16
- ProductID() uint16
- Path() string
- ProductName() stringMethods:
- OnInputReport(callback func([]byte)
- Open() error
- Close() error
- SendReport(id byte, data []byte) error
- SendFeatureReport(id byte, data []byte) error
- ReceiveFeatureReport(id byte) ([]byte, error)