dbushell / deno_usbhidapi Goto Github PK
View Code? Open in Web Editor NEW๐ฆ Deno FFI bindings for the HIDAPI library to access USB devices.
License: MIT License
๐ฆ Deno FFI bindings for the HIDAPI library to access USB devices.
License: MIT License
Hi, thanks for developing this library. For my use case I need to read the report descriptor dynamically. Unfortunately this library has no way of doing so. Is there any way I could get output like that of hid-recorder
?
$ hid-recorder
Available devices:
/dev/hidraw0: Framework HDMI Expansion Card
/dev/hidraw1: FRMW0001:00 32AC:0006
/dev/hidraw2: PIXA3854:00 093A:0274
/dev/hidraw3: 8BitDo Lite 2
Select the device event number [0-3]: 3
# 8BitDo Lite 2
# 0x05, 0x01, // Usage Page (Generic Desktop) 0
# 0x09, 0x05, // Usage (Game Pad) 2
# 0xa1, 0x01, // Collection (Application) 4
# 0x85, 0x01, // Report ID (1) 6
# 0x15, 0x00, // Logical Minimum (0) 8
# 0x25, 0x01, // Logical Maximum (1) 10
# 0x35, 0x00, // Physical Minimum (0) 12
# 0x45, 0x01, // Physical Maximum (1) 14
# 0x75, 0x01, // Report Size (1) 16
# 0x95, 0x14, // Report Count (20) 18
# 0x05, 0x09, // Usage Page (Button) 20
# 0x19, 0x01, // Usage Minimum (1) 22
# 0x29, 0x14, // Usage Maximum (20) 24
# 0x81, 0x02, // Input (Data,Var,Abs) 26
# 0x05, 0x01, // Usage Page (Generic Desktop) 28
# 0x25, 0x07, // Logical Maximum (7) 30
# 0x46, 0x3b, 0x01, // Physical Maximum (315) 32
# 0x75, 0x04, // Report Size (4) 35
# 0x95, 0x01, // Report Count (1) 37
# 0x65, 0x14, // Unit (EnglishRotation: deg) 39
# 0x09, 0x39, // Usage (Hat switch) 41
# 0x81, 0x42, // Input (Data,Var,Abs,Null) 43
# 0x26, 0xff, 0x00, // Logical Maximum (255) 45
# 0x46, 0xff, 0x00, // Physical Maximum (255) 48
# 0x09, 0x30, // Usage (X) 51
# 0x09, 0x31, // Usage (Y) 53
# 0x09, 0x32, // Usage (Z) 55
# 0x09, 0x35, // Usage (Rz) 57
# 0x75, 0x08, // Report Size (8) 59
# 0x95, 0x04, // Report Count (4) 61
# 0x81, 0x02, // Input (Data,Var,Abs) 63
# 0x05, 0x02, // Usage Page (Simulation Controls) 65
# 0x15, 0x00, // Logical Minimum (0) 67
# 0x26, 0xff, 0x00, // Logical Maximum (255) 69
# 0x09, 0xc4, // Usage (Accelerator) 72
# 0x09, 0xc5, // Usage (Brake) 74
# 0x95, 0x02, // Report Count (2) 76
# 0x75, 0x08, // Report Size (8) 78
# 0x81, 0x02, // Input (Data,Var,Abs) 80
# 0xc0, // End Collection 82
#
R: 83 05 01 09 05 a1 01 85 01 15 00 25 01 35 00 45 01 75 01 95 14 05 09 19 01 29 14 81 02 05 01 25 07 46 3b 01 75 04 95 01 65 14 09 39 81 42 26 ff 00 46 ff 00 09 30 09 31 09 32 09 35 75 08 95 04 81 02 05 02 15 00 26 ff 00 09 c4 09 c5 95 02 75 08 81 02 c0
I wouldn't need the parsed descriptions or anything like that, just access to a Uint8Array would be perfectly fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.